Browse Source

Lecture et tidy fichier GHM

master
Maxime Wack 7 years ago
parent
commit
44246f7b62
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      app.R

+ 5
- 2
app.R View File

@@ -7,9 +7,12 @@ library(rgdal)
library(plotly)
library(stringr)

read.csv("ghm.csv") %>%
# Lecture fichier de GHM ----
read_csv("ghm.csv", col_types = cols(IPP = col_character())) %>%
`names<-`(c("IPP", "IEP", "Age", "Sexe", "CP", "GHM", "date_entree", "date_sortie")) %>%
mutate(DS = as.numeric(date_sortie - date_entree),
mutate(date_entree = date_entree %>% as.Date(format = "%Y/%m/%d"),
date_sortie = date_sortie %>% as.Date(format = "%Y/%m/%d"),
DS = as.numeric(date_sortie - date_entree),
Sexe = Sexe %>% factor(labels = c("Homme", "Femme"))) -> GHM

read_csv2("insee.csv") %>%


Loading…
Cancel
Save