How do you convert categorical data to numerical data in R? My categorical explanatory variable is gender and my numerical is height. I want to make a boxplot for the relationship between them. When I go to make a boxplot using this:
aces$genderF <-factor(aces$gender,labels=c("male","female"))
boxplot(aces$height_cm-aces$genderF)
I get an error.
These are the errors which I have found. Try this.
If you still get error ,feel free to ask your query.
Get Answers For Free
Most questions answered within 1 hours.