Dear friends. I'm in windows version R1.0.0. The code below produced a very
beautiful and efficient graph in R Version 0.99.0 Patched (February 9,
2000) but in the newest, the x-axis is unreadable with dates written
unformatted. I tried to set the numbers using par(xaxp) or xaxs but to no
avail. Since it was OK just in the last version I guess there might perhaps
be something wrong somewhere or should I change the code ?
Thank you for the interesting and efficient program !!!!
month day year dosis vanco
12 31 1999 1 3.8
1 3 2000 1 2.4
1 7 2000 1 3.4
1 12 2000 2 7.1
1 14 2000 2 5.3
1 17 2000 2 5.7
1 19 2000 3 7.7
1 21 2000 3 8.3
1 24 2000 4 8.7
1 26 2000 4 11.1
1 31 2000 4 12.3
2 7 2000 4.5 12.0
2 14 2000 4.5 14.9
2 18 2000 4.5 23.0
2 25 2000 3 20.1
2 28 2000 2 11.3
3 1 2000 2 13.7
3 8 2000 3 12.8
3 10 2000 3 7.4
3 13 2000 3 9.1
3 15 2000 3 12.2
3 17 2000 3 13.8
data <- read.table("vanco1.dat",h=T)
attach(data)
library(date)
dates <- mdy.date(month,day,year)
plot(dates,vanco,pch=c(19),xlab='',ylab="[Vancomycin]",
main="serum Vanco versus weekly dose")
abline(h=10,lty=2) #lower acceptable concentration
dm <- c(1,1,1,1,2,2,3)
dd <- c(7,17,21,31,23,25,3)
dy <- rep(2000,7)
limits <- mdy.date(dm,dd,dy)
abline(v=limits,lty=8)
#d <- locator(8)
x <- c(14611.37, 14620.95, 14627.94, 14634.44, 14650.85, 14663.85,
14667.58,14680.15)
mtext(c("1","2","3","4","4.5","3","2","3"),3,at=x)
Troels
look here:
http://www.wired.com/wired/archive/8.04/joy.html
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._