开始使用免费开始使用

主数据总览

到目前为止,您已经把 ratingsurvey 数据集中的信息与原始数据集合并。

我们还在数据集 org_final 中加入了多项与员工相关的信息,例如 compensationno_leaves_taken(已休带薪假天数)、hiring_source 等。请先查看该数据集,然后在下一章进行特征工程。

本练习是课程的一部分

HR Analytics:用 R 预测员工流失

查看课程

练习说明

  • 使用 glimpse() 查看 org_final 数据集的结构。
  • org_final 数据集中的变量数量赋值给 variables
  • 生成箱线图,比较 ActiveInactive 员工的 distance_from_home 分布。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# View the structure of the dataset
___

# Number of variables in the dataset
variables <- ___

# Compare the travel distance of Active and Inactive employees
ggplot(org_final, aes(x = ___, y = ___)) +
  ___
编辑并运行代码