View source: R/MultiBlock2matrix.R
MultiBlock2matrix | R Documentation |
Combines the blocks of a MultiBlock into a matrix. Useful for calculating summary information of the whole MB (ex. maximum value).
MultiBlock2matrix(MB = MB, blocks = NULL, vars = NULL)
MB |
The MultiBlocks structure. |
blocks |
The blocks to combine into a matrix. It can be a vector of integers or a vector with the block names. |
vars |
The variables to kept. It is a list object with the same length as 'blocks'. Each element in the list contains the position of the variables in the nth block. |
The MultiBlock
b1 = matrix(rnorm(500),10,50)
b2 = matrix(rnorm(800),10,80)
# Build MultiBlock by adding one data block at a time:0))
mb <- BuildMultiBlock(b1, newSamples = paste0('sample_',1:1
mb <- BuildMultiBlock(b2, growingMB = mb)
Convert data to a matrix.
mb <- MultiBlock2matrix(MB)
max(mb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.