View source: R/batch_csv_dump.R
batch_csv_dump | R Documentation |
This function takes either a list of data frames, or a data frame and a column to split by, and writes them all to CSV files. It then returns the list of data frames, optionally row-binded back together. It fits neatly in the middle of a longer piped workflow.
batch_csv_dump(
data,
split_by,
path = ".",
base_name = NULL,
bind = FALSE,
verbose = TRUE,
...
)
data |
A data frame or a list of data frames |
split_by |
Bare column name of variable to split by. If |
path |
String giving a path at which to save files; defaults to current working directory. |
base_name |
Optional string to be prepended to all file names. |
bind |
Logical: whether to row-bind list of data frames into a single data frame. Defaults |
verbose |
Logical: whether to print files' paths and names as they're written. Defaults |
... |
Additional arguments to pass to |
Either a list of data frames (in case of bind = FALSE
) or a single data frame (in case of bind = TRUE
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.