| convert_to_fa | R Documentation |
Creates a tibble with columns m.z, p.value, t.score and optionally
r.t to use in the "Functional Analysis" module in 'MetaboAnalyst'.
Metrics are calculated using a t.test.
convert_to_fa(
data,
m_z_col,
rt_col = NULL,
group_column,
groups_to_compare,
batch_column = NULL,
batch = NULL,
adjust_p = FALSE,
log2_before = FALSE,
...
)
data |
A tidy tibble created by |
m_z_col |
Which column holds the precursor m/z? Uses |
rt_col |
Optional. Which column holds the precursor retention times? Uses |
group_column |
Which column should be used for grouping? Usually |
groups_to_compare |
Names of the groups which should be compared as a character vector. Those are the group names in the |
batch_column |
Which column contains the batch information? Usually |
batch |
The names of the batch(es) that should be included when calculating p-value and log2 fold change. |
adjust_p |
Should the p-value be adjusted? Can be either |
log2_before |
A logical. Should the data be log2 transformed prior to calculating the p-values? |
... |
Arguments passed on to |
A tibble with columns m.z, p.value, t.score and optionally
r.t.
# Without optional retention time column
toy_metaboscape %>%
join_metadata(toy_metaboscape_metadata) %>%
convert_to_fa(group_column = Group,
groups_to_compare = c("control", "treatment"),
return_tbl = TRUE,
alternative = "two.sided",
m_z_col = `m/z`)
# With optional retention time column
toy_metaboscape %>%
join_metadata(toy_metaboscape_metadata) %>%
convert_to_fa(group_column = Group,
groups_to_compare = c("control", "treatment"),
return_tbl = TRUE,
m_z_col = `m/z`,
rt_col = RT)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.