load_datafile {portalr} | R Documentation |
read in a raw datafile from the downloaded data or the GitHub repo
Description
does checking for whether a particular datafile exists and then reads it in, using na_strings to determine what gets converted to NA. It can also download the dataset if it's missing locally.
Usage
load_datafile(
datafile,
na.strings = "",
path = get_default_data_path(),
download_if_missing = TRUE,
quiet = TRUE
)
Arguments
datafile |
the path to the datafile within the folder for Portal data |
na.strings |
a character vector of strings which are to be
interpreted as |
path |
either the file path that contains the PortalData folder or "repo", which then pulls data from the PortalData GitHub repository |
download_if_missing |
if the specified file path doesn't have the PortalData folder, then download it |
quiet |
logical, whether to perform operations silently |