fillCoreChromVariables: Fill data frame with columns for missing core chrom variables

View source: R/ChromBackend-functions.R

fillCoreChromVariablesR Documentation

Fill data frame with columns for missing core chrom variables

Description

fillCoreChromVariables() fills a provided data.frame (or DataFrame) with columns for eventually missing core chromatogram variables except peaks variables (i.e. "intensity" and "rtime"). The missing core variables are added as new columns with missing values (NA) of the correct data type. Use coreChromVariables() to list the set of core variables and their data types.

Usage

fillCoreChromVariables(x = data.frame())

Arguments

x

data.frame with potentially present core chrom variable columns

Value

input data frame x with missing core variables added (with the correct data type).

Examples


## Define a data frame
a <- data.frame(msLevel = c(1L, 1L, 2L), other_column = "b")

## Add missing core chromatogram variables to this data frame
fillCoreChromVariables(a)

## The data.frame thus contains columns for all core chromatogram
## variables in the respective expected data type (but filled with
## missing values).

rformassspectrometry/Chromatograms documentation built on March 30, 2024, 8:59 a.m.