romicsSampleNameFromFactor: romicsSampleNameFromFactor()

View source: R/02_Romics_Base_Functions.R

romicsSampleNameFromFactorR Documentation

romicsSampleNameFromFactor()

Description

Changes the samples identifiers using values contained in one of the factors of the metadata of the romics_object

Usage

romicsSampleNameFromFactor(
  romics_object,
  factor,
  original_colnames = "keep",
  factor_name = "original_colnames"
)

Arguments

romics_object

A romics_object created using romicsCreateObject()

factor

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

original_name

Either 'keep' or 'drop', this indicate what to do with the original name either store it in a row of the metadata, OR drop it completely.

colname_factor

The name of a factor from the romics object of which the values are unique for each sample. the factors names can be obtain using the function romicsFactorNames()

Details

enaables the quick renaming of the sample names from a factor contained in metadata, the factor has to contain only unique values.

Value

a romics_object with its columns of the layers data, metadata, and missingdata renamed.

Author(s)

Geremy Clair


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