codebook | R Documentation |
Variable labels are extracted from their comment or label attribute. Variable values are extracted from factor levels, the labels attribute, numeric or boolean attributes.
codebook(data, cols, values = TRUE)
data |
A tibble. |
cols |
A tidy variable selections to filter specific columns. |
values |
Whether to output values (TRUE) or only items (FALSE) |
A tibble with the columns:
item_name: The column name.
item_group: First part of the column name, up to an underscore.
item_class: The last class value of an item (e.g. numeric, factor).
item_label: The comment attribute of the column.
value_name: In case a column has numeric attributes, the attribute names.
value_label: In case a column has numeric attributes or T/F-attributes, the attribute values. In case a column has a levels attribute, the levels.
volker::codebook(volker::chatgpt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.