Am 19 Feb 2007 um 20:28 hat Rene Braeckman geschrieben:
From: Rene Braeckman [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Date sent: Mon, 19 Feb 2007 20:28:01 -0800
Subject:[R] How to avoid sort of x values in dotplot?
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)
library(lattice)
Subj - rep(1:4,each=3)
Time - rep(c(d1,d8,d15),4)
Conc - 1:12
df - data.frame(Subj,Time,Conc)
df$Time - factor(df$Time,levels=df$Time)
dotplot(Conc ~ Time | Subj,
data = df,
layout = c(2,2),
type=b)
HTH,
Bernd
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.