createDict: Create a dictionary object.

createDictR Documentation

Create a dictionary object.

Description

Create a dictionary object.

Usage

createDict(dictionary_dataframe)

Arguments

dictionary_dataframe

a dataframe with the variables: Varname = the variable name Description = a description of the variable. Varname = the name of the categorical variable Codings_Expr = an expression which generates the codings, eg: "c("Other"=1, "Pacific"=2, "Maori"=3)" NB: Codings must be specified in numeric order

Value

a dictionary object Vector of variable desciptions. names(descriptions) are the variable names. List of codings. names(codings) are the variable names. Each element is a vector. The vector values are the category values (eg: 1, 2) and the names of the vector are the category descriptions. Each element also contains the varname attribute.

Example of an element:

Professional Clerical Semi-skilled 1 2 3 attr(,"varname") [1] "SESBTH"


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.