Skip to content

Instantly share code, notes, and snippets.

@uribo
Last active August 29, 2015 14:10
Show Gist options
  • Save uribo/a9c891af11c77bc88fac to your computer and use it in GitHub Desktop.
Save uribo/a9c891af11c77bc88fac to your computer and use it in GitHub Desktop.
read sequence .csv files.
library(dplyr)
seqence.number <- c(2012:2014)
for (i in seqence.number) {
mypath <- file.path(getwd(), paste(i, ".csv", sep = ""))
assign(
paste("df", i, sep = ""),
read.csv(mypath, header = T) %>%
mutate(ID = i))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment