[R] Plot with x-axis dates

Paul Warren Simonin Paul.Simonin at uvm.edu
Fri Feb 6 22:48:24 CET 2009


Hello,
   I am attempting to create plots using two continuous variables and  
it seems I should be able to use the simple "plot" command. However,  
my x-axis values are dates, and I believe this could be the reason I  
am receiving error messages reading:

Error in Summary.factor(c(2L, 4L, 3L, 5L, 6L, 7L, 1L), na.rm = FALSE) :
   range not meaningful for factors

I have attempted to convert the date values to official dates within R  
and have done that successfully using the as.date function, but this  
did not help in the plots. So, how can one create plots in which the  
x-axis is date values? I know it would be possible to convert all my  
dates into a different linear scale (e.g., julian dates). However, I  
would like to complete this process as simply as possible.
Thank you for any advice or information.
Sincerely,
Paul S.




More information about the R-help mailing list