Skip to contents

This function retrieves the data dictionary embedded in the RCDF object

Usage

get_data_dictionary(data)

Arguments

data

Object of class rcdf.

Value

A data frame that serves as a metadata dictionary. It must contain at least the columns: variable_name, label, and type. Optionally, it may include a valueset column for categorical variables, which should be a list column with data frames containing value and label columns.

Examples

dir <- system.file("extdata", package = "rcdf")
rcdf_path <- file.path(dir, 'mtcars.rcdf')
private_key <- file.path(dir, 'sample-private-key.pem')

rcdf_data <- read_rcdf(path = rcdf_path, decryption_key = private_key)
#> Error in check_dbplyr(): The package "dbplyr" is required to communicate with database backends.
data_dictionary <- get_data_dictionary(rcdf_data)
#> Error: object 'rcdf_data' not found
names(data_dictionary)
#> Error: object 'data_dictionary' not found