View source: R/create_codebook.R
| create_codebook | R Documentation |
This function generates a comprehensive codebook for a CES dataset, including variable names, question labels, and response options.
create_codebook(data, include_values = TRUE, format = "tibble")
data |
A CES dataset, typically retrieved using |
include_values |
Logical indicating whether to include response values in addition to labels. Default is TRUE. |
format |
A character string indicating the format to return the codebook in. Default is "tibble". Options include "tibble" or "data.frame". |
A tibble or data.frame containing the codebook with columns for variable name, question label, and response options.
# Get the 2019 CES data
ces_2019 <- get_ces("2019")
# Create a codebook
codebook <- create_codebook(ces_2019)
# View the first few entries
head(codebook)
# Create a codebook without values
codebook_simple <- create_codebook(ces_2019, include_values = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.