probably you're looking for:
plot(y[1, ], axes = FALSE)
axis(1, c(1, 2, 4), c(0, 1, 3))
axis(2)
I hope it helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Tristan Lorino" <tristan.lorino@lcpc.fr>
To: <s-news@lists.biostat.wustl.edu>
Sent: Thursday, March 09, 2006 10:04 AM
Subject: [S] Graphic problem
Hi,
Here is my code:
x_data.frame(c(0,0,1,2,3),c("a","a","a","b","a"),c(.3,.5,.6,.1,.2))
y_tapply(x[,3],x[,c(2,1)],mean)
y
0 1 2 3
a 0.4 0.6 NA 0.2
b NA NA 0.1 NA
plot(y[1,])
I would like to have, on the x-axis, the ticks and labels defined by
the 1st column in x -- that means ticks at 0, 1 and 3. But the plot
gives ticks at 1, 2 and 4. Even if I specify:
axis(1,at=seq(0,3,by=1),seq(0,3,by=1))
axis(2)
the first point is plotted at x=1!
How can I get the good axis?
Thank you,
Tristan Lorino
--
Laboratoire Central des Ponts et Chaussées
[Division ESAR ? Section AGR]
Route de Bouaye BP 4129
44341 Bouguenais Cedex
France
Tél 33 (0)2 40 84 56 18
Fax 33 (0)2 40 84 59 92
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu
with
the BODY of the message: unsubscribe s-news
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
|