R/download_data.R
use_default_data_path.Rd
check_default_data_path
checks if a default data path is
set, and prompts the user to set it if it is missing.
get_default_data_path
gets the value of the data path
environmental variable
use_default_data_path
has 3 steps. First, it checks for
the presence of a pre-existing setting for the environmental variable.
Then it checks if the folder exists and creates it, if needed. Then it
provides instructions for setting the environmental variable.
check_default_data_path(
ENV_VAR = "PORTALR_DATA_PATH",
MESSAGE_FUN = message,
DATA_NAME = "Portal data"
)
get_default_data_path(fallback = "~", ENV_VAR = "PORTALR_DATA_PATH")
use_default_data_path(path = NULL, ENV_VAR = "PORTALR_DATA_PATH")
the environmental variable to check (by default `"PORTALR_DATA_PATH"``)
the function to use to output messages
the name of the dataset to use in output messages
the default value to use if the setting is missing
character
Folder into which data will be downloaded.
FALSE if there is no path set, TRUE otherwise
None