tests/testthat/helper-functions.R

# Function to tidy up at the end of tests
tidy_up <- function() {
  objs <- setdiff(ls(envir = .TargetEnv), "tidy_up")
  rm(list = objs, envir = .TargetEnv)
}

Try the ProjectTemplate package in your browser

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

ProjectTemplate documentation built on Nov. 20, 2023, 1:06 a.m.