MultiBlock: MultiBlock

View source: R/MultiBlock.R

MultiBlockR Documentation

MultiBlock

Description

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

Usage

MultiBlock(
  Samples = NULL,
  Data,
  Variables = NULL,
  Batch = NULL,
  Metadata = NULL
)

Arguments

Samples

The vector with the sample names. Facultative.

Data

A list with the data-blocks. They can be matrices, data.frames or MultiBlocks.

Variables

The vector with the variable names. Facultative.

Batch

A list with the vectors of the batch information. Facultative.

Metadata

A list with the metadata information of each data-block.

Value

The MultiBlock

Examples

b1 = matrix(rnorm(500),10,50) # 10 rows and 50 columns
b2 = as.data.frame(matrix(rnorm(800),10,80)) # 10 rows and 80 columns
b2[c(2,3,4),c(5,7,8)] <- NA # Making some data missing, just for fun.
rownames(b2) <- LETTERS[5:14] # Adding some sample names
b3 = MultiBlock(Samples = 1:10,
                Data = list(s1 = b1, s2 = b2),
                Variables = list(s1 = 1:ncol(b1),
                                 s2 = 1:ncol(b2)))

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