Description Usage Arguments Value Examples
Aggregate samples according to an aggregate function like mean, median, etc.
1 2 | aggregate_samples(dataset, indexes, aggreg.fn = "mean",
meta.to.remove = c())
|
dataset |
list representing the dataset from a metabolomics experiment. |
indexes |
index vector with the samples that are going to be aggregated (e.g. c(1,1,2,2), this index vector will aggregate the first two samples and the last two samples). |
aggreg.fn |
aggregation function (e.g. "mean", "median", etc). |
meta.to.remove |
metadata's variables to be removed. |
Returns the dataset with the samples aggregated.
1 2 3 4 5 | ## Example of aggregating samples
library(specmine.datasets)
data(propolis)
propolis_proc = missingvalues_imputation(propolis)
dataset = aggregate_samples(propolis_proc, as.integer(propolis$metadata$seasons), "mean")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.