powered by
Applies a function to the values of each sample
apply_by_sample(dataset, fn.to.apply, samples = NULL, ...)
list representing the dataset from a metabolomics experiment.
function to apply (e.g. mean, max, min).
if defined restricts the application to a given set of samples.
additional parameters to apply function.
Returns a vector with the samples and the value of the applied function.
# NOT RUN { ## Example of applying a function to variables library(specmine.datasets) data(cachexia) apply.samples.result = apply_by_sample(cachexia, mean) # }
Run the code above in your browser using DataLab