Description Usage Arguments Value Examples
Apply a function to samples from a given metadata's group.
1 | apply_by_group(dataset, fn.to.apply, metadata.var, var.value)
|
dataset |
list representing the dataset from a metabolomics experiment. |
fn.to.apply |
function to apply (e.g. mean, max, min). |
metadata.var |
name of the metadata's variable. |
var.value |
value of the metadata's variable. |
Returns a vector with the variables and the value of the applied function.
1 2 3 4 5 | ## Example of applying a function to a group
library(specmine.datasets)
data(cachexia)
apply.group.result = apply_by_group(cachexia, mean, "Muscle.loss",
"control")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.