if (!require("stringr"))
stop("The package stringr is required for generating the lessons.")
- if (require("checkpoint")) {
+ if (require("checkpoint") && packageVersion("checkpoint") >= '0.4.0') {
required_pkgs <-
checkpoint:::scanForPackages(project = "_episodes_rmd",
verbose=FALSE, use.knitr = TRUE)$pkgs
} else {
- stop("The checkpoint package is required to build the lessons.")
+ stop("The checkpoint package (>= 0.4.0) is required to build the lessons.")
}
missing_pkgs <- required_pkgs[!(required_pkgs %in% rownames(installed.packages()))]