Skip to contents

Recode the category for all after aggregating data based on the specification in Codebook. For example when aggregating category type of diagnoses NA will be produced to represent all type of diagnoses. This will basically recode NA to a preferred value such as 0 or Total.

Usage

do_recode_aggregate(
  dt = NULL,
  spec = NULL,
  con = NULL,
  aggregate = NULL,
  control = FALSE
)

Arguments

dt

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

spec

Specification from tbl_Filgruppe

con

Connection to database

aggregate

Logical value. Default is TRUE. Aggregate data according to the specification in registration database. Global options with orgdata.aggregate.

control

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