Last chance! 50% off unlimited learning
Sale ends in
cols
for required column namesExamines column names, cols
for required column names
checkRequiredCols(cols, reportErrors)
character vector of column names
logical value when TRUE
and missing columns are
found
the errorLst
object is updated with the names of the missing
columns and returned and when FALSE
and missing columns are found
the program is stopped.
NULL is returned if all required columns are present. See description
of reportErrors
for return values when required columns are missing.
# NOT RUN {
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))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab