azadag
11/21/2018 - 5:49 PM

read and combine files map purrr

given a bunch of files ending with congress will pull in and use name slug

library(readr)
library(purrr)

filenames <- dir(path = "data/clean",
                 pattern = "*.csv",
                 full.names = TRUE)
data <- filenames %>% map_dfr(read_csv, .id = "congress")