I have a dataset set of earnings. I want to display a boxplot of earnings depending on race.
The race is split into numbers from 0 to 10. 0 to 3 is white, 4 to 5 is black, 6 to 10 is mixed.
How can I show a boxplot of earnings depending on race?
I tried splitting it into factors, and I have 3 factors now using:
white <- factor(Race < 4)
black <- factor(Race>4 & Race<6)
mixed <- factor(Race>6)
But the box plot doesn't work with that.