tests/testthat/test_examples.R

test_that("Examples run without error", {
  ## we don't want this to run on CRAN
  skip_on_cran()

  ## List of example topics we want to check
  egs <- c("get_sites",
           "get_datasets",
           "get_downloads",
           "filter",
           "taxa",
           "testNULL",
           "samples",
           "get_publications",
           "clean")

  for (i in seq_along(egs)) {
    egout <- try(example(topic = egs[i], package = "neotoma2", ask = FALSE,
                         character.only = TRUE, run.dontrun = TRUE,
                         echo = TRUE))

  }
})

Try the neotoma2 package in your browser

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

neotoma2 documentation built on May 29, 2024, 6:21 a.m.