read_many_csvs: Read and row-bind many CSVs

View source: R/read_many_files.R

read_many_csvsR Documentation

Read and row-bind many CSVs

Description

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.

Usage

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

## Not run: 

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


## End(Not run)

SafeGraphInc/SafeGraphR documentation built on Nov. 25, 2022, 11:20 a.m.