data-raw/equivalence_territoires.R

library(data.table)
library(readxl)
library(usethis)
DT <- read_excel("inst/extdata/Doc1_Correspondance_Etablissement_Public_Loi_10.xls",  # import
                 sheet = "Global")
DT <- as.data.table(DT)
DT <- DT[  # sélection + renommer colonnes
  , .(RLS_2015 = as.integer(`Code\nRLS 2015`),
      RLS_2014 = as.integer(`Code\nRLS 2014`),
      RSS_2015 = as.integer(`Code\nRSS 2015`),
      RSS_2014 = as.integer(`Code\nRSS 2014`),
      RUIS_2015 = as.integer(`Code\nRUIS 2015`),
      RUIS_2014 = as.integer(`Code\nRUIS 2014`),
      CLSC_2015 = as.integer(`Code\nCLSC 2015`),
      CLSC_2014 = as.integer(`Code\nCLSC 2014`))
]
DT <- unique(DT)
setkey(DT)
equivalence_territoires <- copy(DT)
use_data(equivalence_territoires, overwrite = TRUE)
guiboucher/INESSS-inesss.datasets documentation built on July 27, 2020, 11:54 p.m.