Derive age difference
Different generations of the workforce have different views and opinions towards managing and delivering work and handling pressure.
New generation managers need to learn to motivate and manage the pool of older workers. Employees reporting to younger managers generally report overconfidence, lack of respect and inexperience of manager as a reason of turnover while as per younger managers, older employees wallow in their past achievements and do not accept the pace of change in work environment.
In this exercise, you'll calculate the age difference between employees and their respective managers and explore this distribution of age difference between Active and Inactive employees.
Manager age (mgr_age) and employee age (emp_age) are available in org_final.
Este ejercicio forma parte del curso
HR Analytics: Predicting Employee Churn in R
Instrucciones del ejercicio
- Subtract
emp_agefrommgr_ageto create a new variable,age_diff. - Generate a box plot to visualize this age difference for
ActiveandInactiveemployees.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Add age_diff
emp_age_diff <- org_final %>%
___(age_diff = ___ - emp_age)
# Plot the distribution of age difference
ggplot(___, aes(x = ___, y = ___)) +
geom_boxplot()