.rows {StabPerf}R Documentation

Get the rows of a matrix based on a factor

Description

Usage

.rows(factor, factors, matrix)

Arguments

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

Details

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

Value

matrix matrix. Sub-set of rows of original matrix

See Also

.cols

Examples

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

[Package StabPerf version 0.5 Index]