View source: R/create_codebook.R
export_codebook | R Documentation |
This function exports a CES codebook to a CSV or Excel file for easier viewing and sharing.
export_codebook(codebook, file_path, ...)
codebook |
A codebook dataframe created with |
file_path |
The path where the file should be saved, including file extension. Use .csv for CSV or .xlsx for Excel. |
... |
Additional arguments passed to write functions. |
Invisibly returns the file path where the codebook was saved.
# Get data and create codebook
ces_data <- get_ces("2019")
codebook <- create_codebook(ces_data)
# Export to CSV
export_codebook(codebook, "ces_2019_codebook.csv")
# Export to Excel
export_codebook(codebook, "ces_2019_codebook.xlsx")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.