export_codebook {ces}R Documentation

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, ...)

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.

Value

Invisibly returns the file path where the codebook was saved.

Examples

## Not run: 
# 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")

## End(Not run)


[Package ces version 0.1.0 Index]