I have a bunch of csv files that follow the naming scheme: est2009US.csv.
I am reading them into R as follows:
myFiles <- list.files(path=\"~/Dow
plyr makes this very easy:
plyr
library(plyr) paths <- dir(pattern = "\\.csv$") names(paths) <- basename(paths) all <- ldply(paths, read.csv)
Because paths is named, all will automatically get a column containing those names.
paths
all