0

I am very new to R and am looking for advice. I have an output of Olympic Data that has 4 classes (Gold, Silver, Bronze, NoMedal). I would like to know if there is a function in R that will combine 3 of those classes (Gold, Silver, Bronze) into one class (Medal) so that I can use the ROSE function to balance the dataset. Anyone know a function that will do this?

Current Output (4 classes): Gold, Silver, Bronze, NoMedal

Desired Output (2 classes): Medal, NoMedal

camille
  • 16,432
  • 18
  • 38
  • 60
TFurrer
  • 1
  • 2
  • Probably a duplicate of [Cleaning, collapsing multiple factor levels](https://stackoverflow.com/questions/19410108/cleaning-up-factor-levels-collapsing-multiple-levels-labels). Hope that helps you answer your question. – ravic_ Nov 22 '19 at 20:43
  • Does this answer your question? [Cleaning up factor levels (collapsing multiple levels/labels)](https://stackoverflow.com/questions/19410108/cleaning-up-factor-levels-collapsing-multiple-levels-labels) – camille Nov 22 '19 at 21:42

0 Answers0