R/ChromBackend-functions.R
, R/hidden_aliases.R
, R/ChromBackendMemory.R
hidden_aliases.Rd
fillCoreChromVariables()
fills a provided data.frame
with columns for eventually missing core chromatogram variables.
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.
validChromData()
checks that columns, representing core chromatogram
variables are of the correct data type.
For S4 methods that require a documentation entry but only clutter the index.
This method returns the chromatographic data stored in the backend. If not specified otherwise it will return all defined column in the chromData slot as well as dding the coreChromVariables missing with NA values.
fillCoreChromVariables(x = data.frame())
validChromData(x = data.frame(), error = TRUE)
validPeaksData(x = list(), error = TRUE)
# S4 method for class 'ChromBackendMemory'
backendMerge(object, ...)
# S4 method for class 'ChromBackendMemory'
chromData(object, columns = chromVariables(object), drop = FALSE)
# S4 method for class 'ChromBackendMemory'
chromData(object) <- value
# S4 method for class 'ChromBackendMemory'
chromVariables(object)
# S4 method for class 'ChromBackendMemory'
peaksData(object, columns = peaksVariables(object), drop = FALSE)
# S4 method for class 'ChromBackendMemory'
peaksData(object) <- value
# S4 method for class 'ChromBackendMemory'
peaksVariables(object)
# S4 method for class 'ChromBackendMemory'
show(object)
# S4 method for class 'ChromBackendMemory'
x[i, j, ..., drop = FALSE]
# S4 method for class 'ChromBackendMemory'
x$name
# S4 method for class 'ChromBackendMemory'
x$name <- value
input data frame x
with missing core variables added (with the
correct data type).
If core variables have all the correct data type: an empty character.
If one or more core variables (columns) have the wrong data type the
function either throws an error (with error = TRUE
) or returns a
character
specifying which variables/columns don't have the correct
type (for error = FALSE
).
Not applicable
## 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)
#> msLevel other_column chromIndex collisionEnergy dataOrigin dataStorage mz
#> 1 1 b NA NA <NA> <NA> NA
#> 2 1 b NA NA <NA> <NA> NA
#> 3 2 b NA NA <NA> <NA> NA
#> mzMin mzMax precursorMz precursorMzMin precursorMzMax productMz productMzMin
#> 1 NA NA NA NA NA NA NA
#> 2 NA NA NA NA NA NA NA
#> 3 NA NA NA NA NA NA NA
#> productMzMax
#> 1 NA
#> 2 NA
#> 3 NA
## The data.frame thus contains columns for all core chromatogram
## variables in the respective expected data type (but filled with
## missing values).