R/index.R
set_example_safe_dir.Rd
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.
set_example_safe_dir()
unset_example_safe_dir()
The set_example_safe_dir function returns the path of the example directory invisibly.
unset_example_safe_dir
: Restores a user data directory after
running an code example.