[R] Problems plotting time-series with multiple lines

Jose Augusto Jr - jamaj - terra jamaj at terra.com.br
Sat Sep 3 04:52:45 CEST 2005


Dear Sirs,

I want to plot a time series with lines, one for each variable.
I have a dataset with dates, and the values.
How can i plot?
I could plot one variable using index plot, bu i want to put the labels on X 
axis. But i had two problems:
1) The plot function, when i try to plot(x,y), incorectly sort the date (on 
X axis). My dataset has the date in string format "%d/%m/%Y).
If i try to converto to date using
as.Date(Dataset.dates,"%d/%m/%Y)
it interprets the %Y incorrectly.

2) I have 187 rows. So i have to plot only some of the dates, not all.

Please, help me.

Thanks in advance.

Best Regards,

José Augusto M. de Andrade Jr.

"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around darkened rooms, munching magic pills and 
listening to
repetitive electronic music." (Kristian Wilson, Nintendo, Inc. 1989)




More information about the R-help mailing list