# NOT RUN {
library(nprcgenekeepr)
ped <- nprcgenekeepr::qcPed
ped <- ped[order(ped$id), ]
genotype <- data.frame(id = ped$id[50 + 1:20],
first_name = paste0("first_name", 1:20),
second_name = paste0("second_name", 1:20),
stringsAsFactors = FALSE)
## checkGenotypeFile disallows dataframe with < 3 columns
tryCatch({
checkGenotypeFile(genotype[ , c("id", "first_name")])
}, warning = function(w) {
cat("Warning produced")
}, error = function(e) {
cat("Error produced")
})
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab