createDictionary: Create a dictionary

View source: R/createDictonary.R

createDictionaryR Documentation

Create a dictionary

Description

createDictionary creates a dictionary for a set of values given a set of unique integer codes.

Usage

createDictionary(meta, code, value)

Arguments

meta

a data frame or named list. An object containing the codes and values.

code

character or integer. Name or index of the location of codes in meta.

value

character or integer. Name or index of the location of values in meta.

Value

A vector where the value at the index position equals to code, matches the value corresponding to code.

Warning

Given that the function creates the dictionary by hashing the values at the literal position of code, the length of the output vector will be equal to the maximum code value.


asgersvenning/bachelor documentation built on May 2, 2023, 7:06 a.m.