tests/testthat/helper-attacher-detacher.R

detacher <- function(pkgs) {
  lapply(pkgs, function(pkg) {
    try(detach(paste0("package:", pkg), unload = TRUE, character.only = TRUE), silent = TRUE)
  })
}

attacher <- function(pkgs) {
  lapply(pkgs, function(pkg) {
    suppressPackageStartupMessages(suppressWarnings(require(
      pkg,
      character.only = TRUE, quietly = TRUE
    )))
  })
}

Try the coursekata package in your browser

Any scripts or data that you put into this service are public.

coursekata documentation built on Sept. 11, 2024, 8:42 p.m.