WhichCols: Identify Columns Containing Indicator Variables

Description Usage Arguments Value Author(s) See Also Examples

Description

Determine which columns contain indic.var or indic.grp in an object returned by ptycho.

Usage

1
2

Arguments

obj

Object output by ptycho or any numeric object

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

1
2
3
4
5
6
7
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)

ptycho documentation built on May 2, 2019, 9:45 a.m.