cols
for required column namesR/checkRequiredCols.R
checkRequiredCols.Rd
Examines column names, cols
for required column names
checkRequiredCols(cols, reportErrors)
cols | character vector of column names |
---|---|
reportErrors | logical value when |
NULL is returned if all required columns are present. See description
of reportErrors
for return values when required columns are missing.
# \donttest{ library(nprcgenekeepr) requiredCols <- getRequiredCols() cols <- paste0("id,sire,siretype,dam,damtype,sex,numberofparentsknown,birth,", "arrivalatcenter,death,departure,status,ancestry,fromcenter?,", "origin") all(requiredCols %in% checkRequiredCols(cols, reportErrors = TRUE))#> [1] TRUE# }