Register data from Norsk pasientregister (NPR) and Kommunalt pasient- og brukerregister (KPR) contain information on accidents and injuries in Norway. Nevertheless, merging these two data sources is not a straightforward process. This package helps to mitigate this challenge.
To install fyr
package can be done as follows:
if(!require(pak)) install.packages("pak")
pak::pkg_install("fyrtaarn/fyr")
To count injury cases, use function count_case()
.
dt <- count_case(
d,
period = 0,
id = "lopenr",
date.col = "innDato",
acute = FALSE,
days = 0,
diag.col = "hoveddiagnoser"
)
See under References for other functions.