Create new data-dictionary object

stw_dict(...)

# S3 method for default
stw_dict(...)

# S3 method for `NULL`
stw_dict(data_dict, ...)

# S3 method for character
stw_dict(name, type, description, levels = NULL, ...)

# S3 method for data.frame
stw_dict(data_dict, ...)

# S3 method for stw_meta
stw_dict(meta, ...)

# S3 method for stw_dataset
stw_dict(dataset, ...)

Arguments

...

additional args (not used)

data_dict

data.frame that has columns name, type, description

name

character name of the dataset

type

character, type of the variable, see Details

description

character, description of the varaible

levels

character, if type is "factor", the levels of the factor

meta

Object with S3 class stw_meta, contains meta-data

dataset

Object with S3 class stw_dataset, a data frame with attached meta-data

Value

object with S3 class stw_dict