Skip to contents

Loads data into memory based on study directory and one or more file_names.

Usage

load_data(sub_dir = NULL, file_names, use_wd = FALSE, prefer_sas = FALSE)

Arguments

sub_dir

Study directory, which will be appended to its internal base_path. If left as NULL, it will use the working directory as the sub_dir.

file_names

Study file or file_names name(s) - can be a vector of strings. This is the only required argument.

use_wd

for "use working directory" - a flag used when importing local files not on NFS - default value is False

prefer_sas

if set to TRUE, imports sas7bdat files first before looking for RDS files (the opposite of default behavior)

Value

a list of dataframes

Examples

if (FALSE) {
test_data_path <- "../inst/extdata/"
data_list <- load_data(
  sub_dir = test_data_path,
  file_names = "dummyads2",
  use_wd = TRUE
)
}