fix swcarpentry/lesson-examples#118: use checkpoint::scanForPackages
authorFrancois Michonneau <francois.michonneau@gmail.com>
Sat, 29 Apr 2017 22:26:45 +0000 (18:26 -0400)
committerFrancois Michonneau <francois.michonneau@gmail.com>
Sat, 29 Apr 2017 22:26:45 +0000 (18:26 -0400)
bin/generate_md_episodes.R

index 6d8a2d784339382bb2c8c85bfd34b25efb4b5faa..5975d957aa379d3ad2cdfb836a483c28493e2fdb 100644 (file)
@@ -8,8 +8,8 @@ generate_md_episodes <- function() {
 
     if (require("checkpoint")) {
         required_pkgs <-
-            checkpoint:::projectScanPackages(project = "_episodes_rmd",
-                                             verbose=FALSE, use.knitr = TRUE)$pkgs
+             checkpoint:::scanForPackages(project = "_episodes_rmd",
+                                          verbose=FALSE, use.knitr = TRUE)$pkgs
     } else {
         stop("The checkpoint package is required to build the lessons.")
     }
@@ -22,7 +22,7 @@ generate_md_episodes <- function() {
         install.packages(missing_pkgs)
     }
 
-    ## find all the Rmd files, and generates the paths for their respective outputs
+    ## find all the Rmd files, and generate the paths for their respective outputs
     src_rmd <- list.files(pattern = "??-*.Rmd$", path = "_episodes_rmd", full.names = TRUE)
     dest_md <- file.path("_episodes", gsub("Rmd$", "md", basename(src_rmd)))