MultiBlock2matrix: MultiBlock2matrix

View source: R/MultiBlock2matrix.R

MultiBlock2matrixR Documentation

MultiBlock2matrix

Description

Combines the blocks of a MultiBlock into a matrix. Useful for calculating summary information of the whole MB (ex. maximum value).

Usage

MultiBlock2matrix(MB = MB, blocks = NULL, vars = NULL)

Arguments

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.

Value

The MultiBlock

Examples

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)

f-puig/R.ComDim documentation built on Feb. 20, 2024, 6:49 a.m.