Description Usage Arguments Details Value See Also Examples
Export any dataframe that has been processed in R with additional options to also produce a codebook and relevant scripts
1 2 3 4 |
data |
Data frame to export |
filename |
the name of the exported file, without the extension |
location |
If using the puddingR file directory, automatically place the file inside either the open_data folder ("open") the processed_data ("processed"), or outside of the R directory, and in the larger Pudding starter template ("js"), Default: 'open' |
directory |
Directory of the exported file. If set to "auto", this assumes that the project follows the puddingR structure. Otherwise, the "location" parameter is overwritten by the directory in this argument, Default: 'auto' |
format |
file output format (either "csv", "json", or "tsv"), Default: 'csv' |
na |
How to export NA values, Default: ” |
codebook |
Whether to export a codebook using the render_codebook() function, Default: FALSE |
codebook_dir |
Where to export the codebook, default assumes using the puddingR file structure, Default: "auto" which outputs to the "open_data/intermediate" folder. |
scripts |
Character vector of code chunk names to export to a .R script, Default: NULL |
script_file |
The .Rmd file to find the code chunks in (requires directory to find file) |
script_dir |
Directory of where to put the resulting .R script. Defaults to the "open_data" directory in puddingR template, Default: 'auto' |
DETAILS
OUTPUT_DESCRIPTION
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# assuming use of puddingR file template
export_all(mtcars, "cars", codebook = TRUE, scripts = c("load_packages", "analyze_data"),
script_file = "analysis.Rmd")
# assuming not using puddingR template
export_all(mtcars, "cars", directory = "data/my_data/",
codebook = TRUE, codebook_dir = "data/codebooks/")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.