R/load_data.R
load_datafile.Rd
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.
load_datafile(
datafile,
na.strings = "",
path = get_default_data_path(),
download_if_missing = TRUE,
quiet = TRUE
)
the path to the datafile within the folder for Portal data
a character vector of strings which are to be
interpreted as NA
values. Blank fields are also
considered to be missing values in logical, integer, numeric and
complex fields. Note that the test happens after
white space is stripped from the input, so na.strings
values may need their own white space stripped in advance.
either the file path that contains the PortalData folder or "repo", which then pulls data from the PortalData GitHub repository
if the specified file path doesn't have the PortalData folder, then download it
logical, whether to perform operations silently