do_recode: Recode Variables

View source: R/recode.R

do_recodeR Documentation

Recode Variables

Description

Recode variables based on the specification in tbl_KodeBok ie. codebook. LESID must be combined with FILGRUPPE to create a unique reference to be able to recode the variables. Specification group ALLE will be used when neither FILGRUPPE nor LESID is specified.

Usage

do_recode(dt = NULL, spec = NULL, con = NULL, control = FALSE)

Arguments

dt

Input data preferrably in a data.table format but is not mandatory

spec

Specifications data as a data.frame

con

Connection to database

control

Logical value. TRUE if the file has been controlled for possible errors

See Also

Other recode functions: do_recode_aggregate(), do_recode_post(), do_recode_regexp(), get_codebok(), get_codebok_aggregate(), get_codebok_regexp()


helseprofil/orgdata documentation built on Feb. 3, 2025, 4:55 p.m.