Skip to content

Instantly share code, notes, and snippets.

@aurielfournier
Created July 12, 2017 15:27
Show Gist options
  • Select an option

  • Save aurielfournier/d860f2174036700cd667de45b7ddc87f to your computer and use it in GitHub Desktop.

Select an option

Save aurielfournier/d860f2174036700cd667de45b7ddc87f to your computer and use it in GitHub Desktop.
dfa <- data.frame(a=1, b=2, c=3)
dfb <- data.frame(a=1, b=2, c=3)
dfc <- data.frame(a=1, b=2, c=3)
dflist <- list()
dflist[["dfa"]] <- dfa
dflist[["dfb"]] <- dfb
dflist[["dfc"]] <- dfc
for(i in 1:length(dflist)){
name <- names(dflist)[i]
write.csv(dflist[[i]], file=paste0(name,".csv"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment