Description Usage Arguments Author(s)
This function is a wrapper for write_csv. It will write a dataframe to disk. If no table_name is provided and the function is called from within a knitr code chunk, the table_name variable will take the same value as the chunk label. By default, the directory is a 'tables' subdirectory to the working directory, which suits my directory structure nicely. Could of course be customized.
1 2 | save_table(df, table_name = opts_current$get("label"), directory = "tables",
row_names = FALSE)
|
df |
a dataframe |
table_name |
the name of the file to write. By default, it will be same as the label of the chunk from which it was called |
directory |
the directory in which the file will be written |
row_names |
include rownames in the .csv-file? FALSE by default. |
Daniel Lindholm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.