View source: R/split-mass_dataset.R
split_mass_dataset | R Documentation |
This function splits a mass_dataset
object into multiple
subsets based on a specified column in either sample_info
or variable_info
. It also updates the process_info
slot with
the splitting parameters.
split_mass_dataset(object, by, fun)
object |
A |
by |
The column name in |
fun |
A function to apply when |
A list of subsetted mass_dataset
objects.
Xiaotao Shen shenxt1990@outlook.com
data("expression_data")
data("sample_info")
data("variable_info")
object =
create_mass_dataset(
expression_data = expression_data,
sample_info = sample_info,
variable_info = variable_info,
)
object <-
activate_mass_dataset(object, what = "sample_info")
new_object <-
split_mass_dataset(object = object, by = "group")
new_object %>% lapply(dim)
new_object %>% lapply(colnames)
object <-
activate_mass_dataset(object, what = "variable_info")
new_object <-
split_mass_dataset(object = object, by = "rt", fun = function(rt) rt > 600)
new_object %>% lapply(dim)
plot(extract_variable_info(new_object[[1]])$rt)
plot(extract_variable_info(new_object[[2]])$rt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.