Skip to contents

Groups individual data into PCGs

Usage

pcg_grouping(data_input, pcg_liste, inter_returns = NULL)

Arguments

data_input

A data.table or data.frame featuring RA individual data according to naming and data type standards used in PB. For renaming use function GEPack::sora_naming.

pcg_liste

data.table or data.frame with the PCG-list or character vector with the path to an excel file.

inter_returns

Character vector with return objects from intermediate steps of the function. Possible values are "data_input", "ddd_groupings", "input_fun", "last_step", "pcg_gtin", "pcg_li", "pcg_li_all", "pcg_liste", "pcg_pharm", "pcg_threshold", "show_all_steps".

Value

A data.table containing

Jahr

Data year

MonateHorizont

Horizon of data status, either 14, 26 or NA

AhvNr

Pseudo SSN

Geburtsjahr

Year of birthday - used with AhvNr to warrant identification

pcg

Grouped PCG

Author

Magnus Vieten, Yannick Schwarz

Examples

if (FALSE) { # \dontrun{
pcg_grouping(
  data_input = some_RA_IndData_object,
  pcg_liste = "path/to/prepped/pcg_list.xlsx"
)
} # }