[R] Plot grouped data: How to change x-axis? (nlme)

About this list Date view Thread view Subject view Author view Attachment view

From: Karl Knoblick (karlknoblich@yahoo.de)
Date: Wed 31 Dec 2003 - 23:13:45 EST


Message-id: <20031231121345.181.qmail@web10009.mail.yahoo.com>


Hallo!

GENERAL QUESTION:
I'm trying to change the tick marks of the x-axis in a
grouped data plot (nlme).

CONCRETE EXAMPLE:
In the example (see below) I want the x-axis to have
tick marks at 0, 6, 12, 18, 24. How can I do this?

WHAT I TRIED
I tried "normal" methods like axis(...) but this does
not work with this plot. And I also tried xlim=c(0,24)
but the ticks are unchanged and the plot looks worse
(because of no distances to the border of the Panels).

EXAMPLE:

--
# begin example
library(lattice)
library(nlme)

# create sample data set.seed(123) ID<-rep(1:6, each=4) Time<-rep(c(0,6,12,24), 6) Y<-runif(24) DF<-data.frame(ID, Time, Y)

GDF<-groupedData(Y ~ Time | ID, data=DF)

plot(GDF,layout=c(3,2), aspect=0.6, xlab="Months")

# end example

QUESTION: How can I get tick marks at 0, 6, 12, 18, 24 on the x-axis?

Any help will be appreciate.

Karl.

PS: Have a happy new year and keep R running!!

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 01 Jan 2004 - 09:21:04 EST