[R] plot multiple time series

Gabor Grothendieck ggrothendieck at gmail.com
Tue Feb 3 12:50:16 CET 2009


The quantmod package has graphics that are specific to securities.
The zoo package has plot.zoo and xyplot.zoo .

On Tue, Feb 3, 2009 at 6:30 AM, Shimrit Abraham
<shimrit.sabraham at gmail.com> wrote:
> Hi,
>
> I have a dataframe containing a date object in the first column and numeric
> data in two other columns, for a total of three columns. I would like to
> plot the 2 numeric data columns against the dates in one window. How do I do
> this? It is easy to do if only one data series is to be plotted against a
> set of dates, but two or more datasets seems to be harder.
>
> Note: I have daily data where weekends and holidays are left out, e.g. stock
> returns. Therefore, I prefer not to construct a new 'dates' vector.
>
> Thanks,
>
> S.A.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>




More information about the R-help mailing list