rda_noms_variables_vvs <- function(
csv = dir(path = 'data-raw',
pattern = 'libelle_variables_vvs_\\d{4}\\.csv',
full.names = T),
rda_name = 'libelle_variables_vvs.rda'
) {
list_db <- lapply(csv, function(x) {
# Recup année de chaque fichier
annee <- stringr::str_extract(basename(x), '\\d{4}')
db <- readr::read_csv(x)
db$annee <- as.integer(annee)
db
})
libelles_variables_vvs <- dplyr::bind_rows(list_db)
save(libelles_variables_vvs, file = file.path('data', rda_name))
}
rda_noms_variables_vvs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.