| MultiBlock | R Documentation |
Creates a MultiBlock object from a named list of data blocks.
MultiBlock(
Samples = NULL,
Data,
Variables = NULL,
Batch = NULL,
Metadata = NULL,
ignore.names = FALSE,
ignore.size = FALSE
)
Samples |
A vector of sample names shared across all blocks (optional).
When omitted, sample names are taken from the row names of each block.
If no row names exist and all blocks have the same number of rows,
samples are numbered as integers. Use |
Data |
A named list of matrices or data.frames (one entry per block). |
Variables |
A named list of variable-name vectors, one per block (optional). When omitted, column names are taken from each block; if absent, variables are numbered as integers. |
Batch |
A named list of batch vectors, one per block (optional). |
Metadata |
A named list of metadata data.frames, one per block (optional). |
ignore.names |
If TRUE, sample names are not checked across blocks.
All blocks must have the same number of rows unless |
ignore.size |
If TRUE (only meaningful when |
A MultiBlock object.
Puig-Castellví F, Jouan-Rimbaud Bouveresse D, Mazéas L, Chapleur O, Rutledge DN (2021). Rearrangement of incomplete multi-omics datasets combined with ComDim for evaluating replicate cross-platform variability and batch influence. Chemometrics and Intelligent Laboratory Systems, 218, 104422. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.chemolab.2021.104422")}
b1 <- matrix(rnorm(500), 10, 50) # 10 samples, 50 variables
b2 <- matrix(rnorm(800), 10, 80) # 10 samples, 80 variables
# Minimal call: Samples and Variables are filled in automatically.
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
# With explicit sample names (enables cross-block alignment):
rownames(b1) <- paste0("s", 1:10)
rownames(b2) <- paste0("s", 1:10)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
# Blocks with different row counts (replicate design):
b3 <- matrix(rnorm(800), 30, 80)
batch_b3 <- c(rep(1, 10), rep(2, 10), rep(3, 10))
mb3 <- MultiBlock(
Data = list(b3 = b3), Batch = list(b3 = batch_b3),
ignore.names = TRUE, ignore.size = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.