Skip to content

Instantly share code, notes, and snippets.

@denisGustin
Created November 29, 2022 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denisGustin/dd58aafb4557ba7fb32f5e3836b24c2d to your computer and use it in GitHub Desktop.
Save denisGustin/dd58aafb4557ba7fb32f5e3836b24c2d to your computer and use it in GitHub Desktop.
library(refpmsi)
library(dplyr)
# version cim_lib minimale avec code et libellé CIM-10
cim <- refpmsi::refpmsi("cim")
cim_lib <- cim %>%
dplyr::select(cim_code,cim_lib,annee_pmsi) %>%
dplyr::group_by(cim_code) %>%
dplyr::arrange(desc(annee_pmsi), by_groups = TRUE) %>%
dplyr::filter(dplyr::row_number() == 1) %>%
dplyr::ungroup() %>%
dplyr::select(cim_code,cim_lib)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment