Skip to content
Prev 385450 / 398506 Next

plot factors with dots in R

Hi.
It is probably somewhere in docs, but factors are actually numerics vith
labels. 

So with your original data frame

df$x <- factor(df$x)
plot(as.numeric(df$x), df$y)

gives you points. You need to set labels to x axis though.

Cheers
Petr