Learn R Programming

dataquieR (version 2.1.0)

prep_deparse_assignments: Convert two vectors from a code-value-table to a key-value list

Description

Convert two vectors from a code-value-table to a key-value list

Usage

prep_deparse_assignments(
  codes,
  labels,
  split_char = SPLIT_CHAR,
  mode = c("numeric_codes", "string_codes")
)

Value

a vector with assignment strings for each row of cbind(codes, labels)

Arguments

codes

codes, numeric or dates (as default, but string codes can be enabled using the option 'mode', see below)

labels

character labels, same length as codes

split_char

character split character character to split code assignments

mode

character one of two options to insist on numeric or datetime codes (default) or to allow for string codes