[R] Help with lines when x-axis is a date
    Joe Trubisz 
    jtrubisz at mac.com
       
    Tue May 27 15:42:00 CEST 2008
    
    
  
Hi...
I have a set of data, that looks like the following:
date mornenzyme niteenzyme pdate
where date is the original data char string and pdate is the POSIX  
representation.
mornenzyme and niteenzyme are both float values.
What I want to do is plot pdate against both enzymes, by having a  
small blue circle
where the nite enzyme reading is and a red in the morning and for  
each date, have
them connected by a line.
I can easily do the points with a plot followed by a points command,  
but the line
has me stumped. I tried:
for(i in length(enz[,1]) {
lines(c(pdate[i],mornenzyme[i]),c(pdate[i],niteenzyme[i]))
}
...but nothing plots. No line, no nothing and no error. Seems to be  
an issue when a date is
used as the x-axis. Not sure what the solution to this is. Any help  
appreciated.
PS: No...this is not time-series data, hence, cannot use ts.plot.
TIA
Joe
    
    
More information about the R-help
mailing list