1. Learn
  2. /
  3. Projects
  4. /
  5. HR Analytics: Exploring Employee Data in R

Connected

Exercise

What does the pay difference look like now?

It appears that the job level mix is different for new hires. New hires are less likely to be hourly employees, and more likely to be salaried or managers. Do new hires have a higher average salary than current employees when job level is taken into account? Calculate the average salaries, and then recreate the bar chart from earlier in the chapter, adding faceting to split it up by the three job levels. Are the bar heights closer together than they were in the first plot?

Instructions 1/2

undefined XP
    1
    2
  • Use group_by() and summarize() to calculate the avg_salary for new and current employees by job level. Assign the result to pay_grouped.