Description Usage Arguments Value Examples
Applies a function to the values of each sample
1 | apply_by_sample(dataset, fn.to.apply, samples = NULL, ...)
|
dataset |
list representing the dataset from a metabolomics experiment. |
fn.to.apply |
function to apply (e.g. mean, max, min). |
samples |
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.
1 2 3 4 | ## Example of applying a function to variables
library(specmine.datasets)
data(cachexia)
apply.samples.result = apply_by_sample(cachexia, mean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.