exportCSV | R Documentation |
Handy wrapper functions to export data tables that then returns the file path of the exported file. This can be useful in applications such as within tarchetypes::tar_file
.
exportCSV(x, file, ...)
exportXLSX(x, file, ...)
x |
a data frame or tibble to export |
file |
file or connection to write to |
... |
arguments to pass to |
If the file path directory does not exist, the directory is created recuresively prior to export.
The file path of the exported file.
## Export to a csv
exportCSV(iris, paste0(tempdir(),"/iris.csv"))
## Export to an Excel workbook
exportXLSX(iris, paste0(tempdir(),"/iris.xlsx"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.