One CSV File with instagram Vancouver 2015 neighborhood using lapply() to read the CSV file and then bind_rows() to combine the rows of the CSV files
Pontifications
- Using
bind_rows()
andlapply()
, I combined the 6 neighborhood CSV files made with add-neightbourhood-to-csv.rb for instagram vancouver 2015 into 1 file called ig_van_2015-colour-lat-long-date-neighborhood.csv using the following R code:
# https://stackoverflow.com/questions/30242065/trying-to-merge-multiple-csv-files-in-r
ig_van_neighbourhood_2015 <- list.files(
"/Users/rtanglao/Dropbox/GIT/ig-ggmap/WITH_NEIGHBOURHOOD_CSV_FILES_FOR_GGMAP_2015",
pattern = "[[:print:]]*neighbourhood[[:print:]]*.csv",
full.names = TRUE) %>%
lapply(read_csv) %>%
bind_rows
write.csv(ig_van_neighbourhood_2015,
file = "ig_van_2015-colour-lat-long-date-neighborhood.csv",
row.names=FALSE)