Created
September 4, 2018 09:23
-
-
Save jcpsantiago/9ada2fff118e8181ba3f60ebfb580afa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## gather your data frames into a list | |
l <- list(cars = mtcars, | |
sleepy = sleep) | |
## export into individual CSV files | |
export_list <- function(list, folder = NULL) { | |
purrr::iwalk( | |
list, | |
~ readr::write_csv(.x, path = paste0(folder, .y, ".csv")) | |
) | |
# success!!! | |
print(paste(length(list), "tables exported!")) | |
} | |
# https://git.io/fA4DE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment