Learn R Programming

ces (version 1.0.2)

export_codebook: Export Codebook to CSV or Excel

Description

This function exports a CES codebook to a CSV or Excel file for easier viewing and sharing.

Usage

export_codebook(codebook, file_path, ...)

Value

Invisibly returns the file path where the codebook was saved.

Arguments

codebook

A codebook dataframe created with create_codebook().

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.

Examples

Run this code
# \donttest{
# 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")
# }

Run the code above in your browser using DataLab