1. Learn
  2. /
  3. Courses
  4. /
  5. Business Process Analytics in R

Exercise

Cost versus urgency

The dataset vacancies_impact we just created contains the total_cost and cost_impact for each case, but it also contains a data attribute urgency, which indicates whether the vacancy is urgent (urgency == 10) or not (urgency == 1). Use dplyr's case_when() to create the variable cost_profile, which indicates whether costs where incurred appropriately:

  • Disproportionate if cost_impact == High and urgency less than 7
  • Excessive if cost_impact == Medium, and urgency less than 5
  • Lacking if cost_impact == Low and urgency is greater than 6
  • Appropriate otherwise

Instructions 1/3

undefined XP
    1
    2
    3

Create the variable cost_profile according to the rules given above. Store the results in vacancies_profile.