Analytique RH : Exploration des données d'employés avec R
Ben Teusch
HR Analytics Consultant
Pourquoi miser sur la sécurité ?
accident_data
year employee_id accident_time
1 2017 1 Morning
2 2016 4 Afternoon
hr_data
year employee_id location
1 2016 1 Northwood
2 2017 1 Northwood
joined_data <- left_join(hr_data, safety_data, by = c("year", "employee_id"))joined_data
year employee_id location accident_time
1 2016 1 Northwood <NA>
2 2017 1 Northwood Morning
joined_data
year employee_id location accident_time
1 2016 1 Northwood <NA>
2 2017 1 Northwood Morning
joined_data %>% filter(accident_time == NA) # aucun résultatjoined_data %>% filter(is.na(accident_time)) # utiliser is.na() à la place
year employee_id location accident_type
1 2016 1 Northwood <NA>
5 == 5
TRUE
NA == NA
NA
is.na(NA)
TRUE
Analytique RH : Exploration des données d'employés avec R