View source: R/transformations.R
merge_exprs | R Documentation |
Replaces a subset of data in exprs of an object by new values. Used after an operation such as imputation is computed only for a subset of features or samples such as only good-quality features that have not been flagged. This function is mainly used internally, but can be useful.
merge_exprs(object, y)
object |
a MetaboSet object |
y |
matrix containing new values to be merged into exprs |
a MetaboSet object with the new exprs values
ex_set <- merged_sample[1:5, 1:5]
exprs(ex_set)
# Create a matrix of replacment values for rows 1, 3, 5 and columns 1, 3, 4
replacement <- matrix(1:9,
ncol = 3,
dimnames = list(
featureNames(ex_set)[c(1, 3, 5)],
sampleNames(ex_set)[c(1, 3, 4)]
)
)
replacement
merged <- merge_exprs(ex_set, replacement)
exprs(merged)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.