update_mass_dataset: Update mass_dataset class object after give the one new item

View source: R/update_mass_dataset.R

update_mass_datasetR Documentation

Update mass_dataset class object after give the one new item

Description

Update mass_dataset class object after give the one new item

Usage

update_mass_dataset(object)

Arguments

object

(required) mass_dataset class object.

Value

A mass_dataset class object.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

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

####only remain QC samples
sample_info = extract_sample_info(object = object)

sample_info =
  dplyr::filter(sample_info, class == "QC")

object@sample_info = sample_info

object = update_mass_dataset(object = object)
object

####only remain feature with mz < 300
variable_info = extract_variable_info(object = object)

variable_info =
  dplyr::filter(variable_info, mz < 300)

object@variable_info = variable_info

object = update_mass_dataset(object = object)
object

tidymass/massdataset documentation built on Oct. 17, 2022, 7:25 a.m.