.cols {StabPerf}R Documentation

Get the cols of a matrix based on a factor

Description

Usage

.cols(factor, factors, matrix)

Arguments

factor factor. The factor to select out of the cols of matrix
factors factor. Vector of all factors (one for each col of matrix
matrix matrix. Data.

Details

It must be the case that length(factors)==ncol(matrix)

Value

matrix matrix. Sub-set of cols of original matrix

See Also

.rows

Examples

factors <- c(rep(this-is-escaped-code{, 3), rep(this-is-escaped-codenormal-bracket7bracket-normal, 5))
data <- matrix(1:80, ncol=8)
# Returns the first 3 cols of the 8 x 10 matrix
# It must be the case that length(factors)==ncol(data)
healthy.cols <- .cols(this-is-escaped-codenormal-bracket8bracket-normal, factors, data)

[Package StabPerf version 0.5 Index]