Skip to contents

Check the validity of a specified 'environment' string

Usage

ensure_valid_env(env, null_ok = NULL)

Arguments

env

A character string specifying the environment for which to get the path. This should be one of 'main', 'ref' or 'test'.

null_ok

Whether it is valid for env to be NULL.

Value

NULL (invisibly)

Details

Valid environments for data are:

  • main: Data produced by running the package code

  • ref: Reference data (historical data which is used for regression testing)

  • test: Test data

Examples

ensure_valid_env("ref")
if (FALSE) { # \dontrun{
ensure_valid_env("nonexistent") # => Causes an error
} # }