This accepts a directory. It will load every csv or csv.gz in that folder and attempt to row-bind them together. You can alternately specify a list of files if you don't want everything in the folder. This is designed for use with the normalization and home-summary files as downloaded from AWS.

read_many_csvs(
  dir = ".",
  recursive = TRUE,
  filelist = NULL,
  makedate = FALSE,
  ...
)

Arguments

dir

Name of the directory the files are in.

recursive

Search in all subdirectories as well.

filelist

Optionally specify only a subset of the filename to read in (can contain paths).

makedate

Use year, month, and day columns in the data to create a date variable. Works with normalization files.

...

Other arguments to pass to data.table::fread.

Examples

if (FALSE) {

# The current working directory contains all the normalization .csv files
normalization <- read_many_csvs(makedate = TRUE)

}