| AddMetadata | R Documentation |
Creates a MultiBlock object containing only one block. This function is used when Batch or Metadata information must be added.
AddMetadata(
newBlock = newBlock,
newVars = NULL,
newSamples = NULL,
batches = NULL,
metadata = NULL
)
newBlock |
The data to be incorporated into the MultiBlock structure. It can be a matrix or a data.frame. |
newVars |
The variable names (optional). If NULL, variables names will be taken from the column names in newBlock. If none of them exist, variables will be identified with integers. |
newSamples |
The sample names (optional). The sample replicates should have the same name. If NULL, sample names will be taken from the row names in newBlock if there are. If none of them exist, samples will be identified with integers. |
batches |
A vector indicating the batch number for every sample (optional). |
metadata |
A data.frame descriptive of newBlock (optional). |
The MultiBlock
b1 = matrix(rnorm(500),10,50) # 10 rows and 50 columns
b2 = matrix(rnorm(800),10,80) # 10 rows and 80 columns
b3 = matrix(rnorm(700),10,70) # 10 rows and 70 columns
# Build AddMetadata by adding one data block at a time:
mb <- AddMetadata(b1, newSamples = paste0('sample_',1:10))
mb <- AddMetadata(b2, growingMB = mb)
mb <- AddMetadata(b3, growingMB = mb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.