R/clean_cached_exercises.R

Defines functions clean_cached_exercises

Documented in clean_cached_exercises

#' clean_cached_exercises
#'
#' @keywords internal
#'
clean_cached_exercises <- function() {
  path <- system.file("tutorials", package = "RPiR")
  if (rlang::is_empty(path) || path == "")
    stop("RPiR package does not contain a tutorials folder")
  files <- list.files(path, pattern = "\\.Rmd$", recursive = TRUE)
  for (rmd in files)
    rmarkdown::shiny_prerendered_clean(file.path(path, rmd))
}
IBAHCM/RPiR documentation built on Jan. 12, 2023, 7:41 p.m.