Description Usage Arguments Value Examples
With a file or dataframe as input, possibility to ssplit it on a given variable and write to disk
1 | split_file_into(df, out_file = NULL, split_by = NULL, into = "sheets")
|
out_file |
output file path(s) |
into |
one of "sheets" or "files" |
file |
input file path or a dataframe |
A File is written on provided path(s)
1 2 3 4 5 6 7 8 9 | split_file_into(iris, out_file = "iris_splitted.xlsx", split_by = "Species", into = "sheets")
split_file_into(iris, out_file = "iris_splitted_%s.xlsx", split_by = "Species", into = "files")
# Giving a file path works too
rio::export(iris, "iris.xlsx")
split_file_into("iris.xlsx", out_file = "iris_splitted_%s.xlsx", split_by = "Species", into = "files")
# takes a single file and splits it by the column split_by.
# then write multiple files or a single file with multiple sheets
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.