library(nprcgenekeepr)
requiredCols <- getRequiredCols()
cols <- strsplit(
paste0(
"id,sire,siretype,dam,damtype,sex,numberofparentsknown,birth,",
"arrivalatcenter,death,departure,status,ancestry,fromcenter?,",
"origin"
),
","
)[[1L]]
checkRequiredCols(cols, reportErrors = TRUE) # NULL: all required present
# A missing required column is returned by name
checkRequiredCols(setdiff(cols, "birth"), reportErrors = TRUE)
Run the code above in your browser using DataLab