load_data: Load Data from ZIP File

Description Usage Arguments Value Examples

View source: R/jigsaw.R

Description

This function takes a zipfile from Jigsaw, identifies all files in the zipfile, and unzips them all into a temp file. Then it cleans the data by fixing dates to be an R date class (using the data.table IDate class for speed). Finally, it gives the option of loading all of the files into the global environment, or saving them all as RDS files to a user-specified directory. This function provides status updates at each step using the R message function. File reading is done using the data.table fread() function which is set to "verbose" output to help the user identify problems.

Usage

1
load_data(zipfile = NULL, load_files = TRUE, save_dir = ".", ver = 1L)

Arguments

zipfile

The path to the ZIP file to load as a character string.

load_files

Should the files be loaded to the global environment? Defaults to TRUE.

save_dir

The path to the directory where the file should be saved. Defaults to working directory.

ver

The version of the export being used. 1L is original. 2L is updated.

Value

Returns a list of the filenames for later loading.

Examples

1
## Not run: # nothing here yet

outcomesinsights/jigsaw_r documentation built on May 24, 2019, 5:54 p.m.