Skip to contents

Creating dictionaries

Functions for creating and combining DataDictionary objects.

data_dictionary()
Create Data Dictionary from Variable Definitions
as_data_dictionary()
Create Data Dictionary from Existing Data
bind_dictionary() left_bind() right_bind()
Bind Dictionaries Together
bind_variables()
Bind Variables to a Dictionary
select_variables()
Select Variables in a Dictionary

Variable types

Constructor functions for specifying the type of each variable in a dictionary.

Getting information

Functions for extracting information from a DataDictionary.

get_unknowns()
Get Unknown Fields in Dictionary
get_term_key()
Get Term Key for Nominal Variables
get_dictionary()
Extract Dictionary Meta Data as a Tibble
get_acronym_defs()
Get Acronym Definitions

Setting metadata

Functions for adding or updating metadata in a DataDictionary. All functions accept a dictionary as their first argument and can be chained with |>.

set_labels() set_descriptions() set_units() set_divby_modeling() set_category_labels() set_category_order()
Modify Data Dictionary Elements
set_variable_order()
Modify order of variables in a data dictionary
set_identifiers()
Set Identifier Variables
set_default_dictionary()
Set the default dictionary used by perinary functions
set_label_templates() set_description_templates()
Set Label and Description Templates
set_acronyms()
Set and Remove Acronyms

Translating data

Functions for applying a DataDictionary to a dataset by renaming columns, recoding category values, or combining both operations.

translate_data() translate_names() translate_categories()
Translate data, names, and categories with a dictionary
use_template()
Use a template to document a variable

Indexing columns and rows

Functions for reordering rows or columns in a data frame using dictionary metadata.

index_columns()
Order columns by dictionary variables
index_rows()
Order rows by dictionary terms
index_terms()
Order model terms by dictionary variables and category levels