WhichCols {ptycho} | R Documentation |
Identify Columns Containing Indicator Variables
Description
Determine which columns contain indic.var
or indic.grp
in an
object returned by ptycho
.
Usage
indicVarCols(obj)
indicGrpCols(obj)
Arguments
obj |
Object output by |
Value
If the input object is a numeric vector, returns the indices of its entries that have names starting with “indic.var” or “indic.grp”, respectively.
Otherwise, it returns the indices of colnames(obj)
that start with
“indic.var” or “indic.grp”, respectively.
Author(s)
Laurel Stell and Chiara Sabatti
Maintainer: Laurel Stell <lstell@stanford.edu>
See Also
ptycho
; also ptychoOut
and
PosteriorStatistics for example below
Examples
data(ptychoOut)
colnames(ptychoOut)[indicVarCols(ptychoOut)]
# Can also apply these functions to output of meanIndicators ...
mi <- meanIndicators(ptychoOut)
mi[indicGrpCols(mi)]
# ... instead of using meanGrpIndicators or meanVarIndicators
meanGrpIndicators(ptychoOut)
[Package ptycho version 1.1-4 Index]