[R] How to avoid sort of x values in dotplot?

Rene Braeckman RMan54 at cox.net
Tue Feb 20 05:28:01 CET 2007


I am trying to avoid that dotplot sorts my x-values. They are in the correct
order in the data.frame and the connections between the x-y values follows
this order, but the placement of the x-values on the x-axis is re-ordered.
In the following example, the order should be "d1", "d8" and "d15". However,
this script places "d8" at the highest x position. Any help is appreciated.
 
Subj <- rep(1:4,each=3)
Time <- rep(c("d1","d8","d15"),4)
Conc <- 1:12
df <- data.frame(Subj,Time,Conc)
dotplot(Conc ~ Time | Subj,
       data = df,
       layout = c(2,2),
       type="b")
 
Thanks,
-Rene
Irvine, CA, USA



More information about the R-help mailing list