按招聘来源的离职率
另一项可衡量雇佣质量的指标是离职率,即入职员工离开公司的频率。请确定哪些招聘渠道的离职率最高、哪些最低。
在上一个练习中,输出是一个包含招聘渠道与平均指标达成度的数据框。如果当时用 arrange() 进行了排序,就更容易看出哪个渠道的员工表现最好。
本练习是课程的一部分
HR 分析:用 R 探索员工数据
练习说明
recruitment 和 dplyr 已加载到您的工作区。
- 使用
summarize()计算各招聘来源内的离职率。将结果存入名为attrition_rate的新列。 - 按离职率从低到高排序结果,并将其赋值给
avg_attrition。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Find the average attrition for the sales team, by recruiting source, sorted from lowest attrition rate to highest
avg_attrition <- recruitment %>%
___ %>%
___ %>%
___
# Display the result
avg_attrition