set_example_safe_dir: Functions to use an example data directory for package...

View source: R/index.R

set_example_safe_dirR Documentation

Functions to use an example data directory for package examples

Description

The documentation of safedata includes code examples using a data directory. A zipped example directory is included in the package files (data/safedata_example_dir.zip) but package code must not write within the package structure. The set_example_safe_dir function is used in code examples to unpack this example directory into a temporary folder and set it for use in the example code. The function unset_example_safe_dir is then used to restore any existing data directory set by the user. The example directory should only be created once per session.

Usage

set_example_safe_dir()

unset_example_safe_dir()

Value

The set_example_safe_dir function returns the path of the example directory invisibly.

Functions

  • unset_example_safe_dir: Restores a user data directory after running an code example.

See Also

set_safe_dir


safedata documentation built on May 31, 2023, 9:01 p.m.