romicsSubset: romicsSubset()

View source: R/02_Romics_Base_Functions.R

romicsSubsetR Documentation

romicsSubset()

Description

Keeps or drop a subset of specific elements/columns from the romics_object

Usage

romicsSubset(
  romics_object,
  subset_vector,
  type = "keep",
  by = "colnames",
  factor = "main"
)

Arguments

romics_object

A romics_object created using romicsCreateObject()

subset_vector

A character vector of factor levels or colnames to keep in the object.

type

Either 'keep' or 'drop' to indicate if you want to conserve or to drop the elements from a given factor

by

Either 'colnames' or 'level' to indicate what you want to keep or drop.

factor

A factor contained in the metadata of the romics_object, to obtain the list of factors please use the function romicsFactorNames()

Details

This function create a new object based on a previous romics_object to include or drops a list of specified columns from the original object. The created object will have a new step object created that will indicate the name of the original object to be subsetted and the log/non-log status of the object.

Note that this function will remove the stat layer from your object

Value

This function generate a subseted romics_object

Author(s)

Geremy Clair


PNNL-Comp-Mass-Spec/RomicsProcessor documentation built on March 18, 2023, 5:14 a.m.