I have a variable which encodes group ID:
d <- data.frame(group = c(0,1,0,2,1,3,2,0,1,2), x=c(1.2,2.3,3.2,2.1,1.3,1.5,2.3,0.4,1.3,1.7))
When I try to use it in ggplot2 for making boxplots I get an error
Continuous value supplied to discrete scale
At attempt to render data. Then I manually change at least one group ID in data to text everything works OK.
So, my question is: is where some easy way to change continuous variable, containing finite number of variants to discrete?