mutate_rsd | R Documentation |
This function adds a new column to the variable_info
slot of a mass_dataset object,
which contains the relative standard deviation (RSD) for each variable according to the samples specified.
mutate_rsd(object, according_to_samples = "all")
object |
A mass_dataset object. |
according_to_samples |
A character vector specifying the sample IDs to consider when calculating the RSD. Default is "all", which considers all samples. |
A modified mass_dataset object with an updated variable_info
slot.
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
##calculate RSDs according to all the samples
object =
mutate_rsd(object = object)
object
head(extract_variable_info(object))
##calculate RSDs according to only QC samples
object =
mutate_rsd(object = object,
according_to_samples =
get_sample_id(object)[extract_sample_info(object)$class == "QC"])
object
head(extract_variable_info(object))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.