Skip to contents

Some annotation_sources, such as LCMS tables (lcms_table), require that certain columns are present in the data.frame. These are defined by slots in the source definition. The name of slots containing the required column names for a source can be retrieved using the required_cols function, which will collect and return the names of slots containing required column names for the object and all of its parent objects.

Usage

required_cols(obj, ...)

Arguments

x

an annotation_source object

Value

a character vector of slot names

Examples

# prepare object
M <- lcms_table(id_column = "id", mz_column = "mz", rt_column = "rt")

#' # get values for required slots
r <- required(M)
#> Error in required(M): could not find function "required"

# get slot names for required columns
names(r)
#> Error in eval(expr, envir, enclos): object 'r' not found