主資料總覽
到目前為止,你已經把 rating 和 survey 資料集的資訊與原始資料集合併。
我們也在 org_final 資料集中加入了其他與員工相關的資訊,例如 compensation、no_leaves_taken(已休假天數)、hiring_source 等等。先來看看這個資料集,再在下一章進行特徵工程。
本練習屬於課程
HR 分析:以 R 預測員工流失
練習說明
- 使用
glimpse()檢視org_final資料集的結構。 - 將
org_final資料集中的變數數量指定給variables。 - 繪製盒狀圖,視覺化
Active與Inactive員工的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 = ___)) +
___