Skip to contents

Make age groups in accordance to Art. 2 VORA from 19.10.2016 (Release 1.1.2022).

Usage

make_age_groups(DT, style = "normal")

Arguments

DT

A data.table containing variables "Jahr" and "Geburtsjahr" (both of type integer).

style

Designate output format. "normal" gives type "36", "sora" gives type "36-40".

Value

Adds variable "Altersklasse" to input data.table

See also

Author

Yannick Schwarz

Examples

make_age_groups(data.table::data.table(Jahr = 2021, Geburtsjahr = 1962))
#>     Jahr Geburtsjahr Altersklasse
#>    <num>       <num>       <char>
#> 1:  2021        1962           56