[R] abline with zoo series
Erin Hodgess
erinm.hodgess at gmail.com
Fri Nov 25 05:37:52 CET 2016
Awesome!!!!
Thanks!!!!!
Sincerely,
Erin
On Thu, Nov 24, 2016 at 10:14 PM, David Winsemius <dwinsemius at comcast.net>
wrote:
>
> > On Nov 24, 2016, at 7:03 PM, Erin Hodgess <erinm.hodgess at gmail.com>
> wrote:
> >
> > Hello! Happy Thanksgiving to those who are celebrating.
> >
> > I have a zoo series that I am plotting, and I would like to have some
> > vertical lines at certain points, to indicate US business cycles. Here
> is
> > an example:
> >
>
> library(tseries)
> > app1 <- get.hist.quote(instrument="aapl", # note correction
> > start="1985-01-01",end="2016-08-31", quote="AdjClose", compression="m")
> > #Fine
> > plot(app1,main="Historical Stock Prices: Apple Corporation")
> > #Still Fine
> > #Now I want to use abline at July 1990 and March 1991 (as a start) for
> > business cycles. I tried v=67 and v="1990-07", no good.
>
> #Try this:
>
> abline( v= as.Date("1990-07-01") )
>
> The x-axis is being created using the Date class values and formatting.
>
>
> >
> > I have a feeling that it's really simple and I'm just not seeing it.
> >
> > Any help much appreciated.
> >
> > Thanks,
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics
> > University of Houston - Downtown
> > mailto: erinm.hodgess at gmail.com
> >
> > [[alternative HTML version deleted]]
>
> Sigh.
>
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
>
> David Winsemius
> Alameda, CA, USA
>
>
--
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com
[[alternative HTML version deleted]]
More information about the R-help
mailing list