This class provides a method for creating directories in the tempdir folder for testing purposes. It also provides a method for reading files from the inst/extdata folder.
Super class
wordpredictor::Base
-> EnvManager
Methods
Method new()
It initializes the current object. It simply calls the base class constructor.
Usage
EnvManager$new(rp = "../../", ve = 0)
Method get_data_fn()
Checks if the given file exists. If it does not exist, then it tries to load the file from the inst/extdata data folder of the package. It throws an error if the file was not found. If the file exists, then the method simply returns the file name.
Method td_env()
Removes the ed folder created by the setup_env method. Also sets the R option, "ed" to NULL.
Method setup_env()
Copies the given files from test folder to the environment folder.
Usage
EnvManager$setup_env(fns = c(), cf = NULL)