Schreiber, Stefan <Stefan.Schreiber <at> ales.ualberta.ca> writes:

> 
> Hey list!
> 
> I have a csv-file with two variables: (Date,CMI)
> 
> Date,CMI
> Jan-93,3.24
> Feb-93,-2.56
> .
> .
> .
> Dec-06,       8.25
> 
> When I want to plot this dataset, R is sorting the date in alphabetical
> order. Is there any way to tell R not to do it?
> 
> I know it is probably an easy issue but I couldn't find a solution so
> far. I have seen so many tips already but can't apply it on my own
> dataset.
> 

  R probably thinks your date column is a factor.

   try something like

   x$Date <- as.Date(paste("01",x$Date,sep="-"),fmt="%d-%b-%y")

 ?

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to