block.data.frame {multiblock} | R Documentation |
Block-wise indexable data.frame
Description
This is a convenience function for making data.frame
s that are easily
indexed on a block-wise basis.
Usage
block.data.frame(X, block_inds = NULL, to.matrix = TRUE)
Arguments
X |
Either a single |
block_inds |
Named |
to.matrix |
|
Value
A data.frame
which can be indexed block-wise.
Examples
# Random data
M <- matrix(rnorm(200), nrow = 10)
# .. with dimnames
dimnames(M) <- list(LETTERS[1:10], as.character(1:20))
# A named list for indexing
inds <- list(B1 = 1:10, B2 = 11:20)
X <- block.data.frame(M, inds)
str(X)
[Package multiblock version 0.8.8.1 Index]