Re: [R] abline with zoo series

2016-11-24 Thread Erin Hodgess
Nice! That's perfect! Thanks very much! Sincerely, Erin On Thu, Nov 24, 2016 at 11:27 PM, Gabor Grothendieck < ggrothendi...@gmail.com> wrote: > Recessions are typically shown by shading. The zoo package has > xblocks for this purpose. If app1 is your zoo object then: > > plot(app1) > tt <-

Re: [R] abline with zoo series

2016-11-24 Thread Gabor Grothendieck
Recessions are typically shown by shading. The zoo package has xblocks for this purpose. If app1 is your zoo object then: plot(app1) tt <- time(app1) xblocks(tt, tt >= "1990-07-01" & tt <= "1991-03-31", col = rgb(0.7, 0.7, 0.7, 0.5)) # transparent grey See ?xblocks for more info. On Thu,

Re: [R] abline with zoo series

2016-11-24 Thread Erin Hodgess
Awesome Thanks! Sincerely, Erin On Thu, Nov 24, 2016 at 10:14 PM, David Winsemius wrote: > > > On Nov 24, 2016, at 7:03 PM, Erin Hodgess > wrote: > > > > Hello! Happy Thanksgiving to those who are celebrating. > > > > I have a zoo

Re: [R] abline with zoo series

2016-11-24 Thread David Winsemius
> On Nov 24, 2016, at 7:03 PM, Erin Hodgess 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

Re: [R] abline with zoo series

2016-11-24 Thread Jim Lemon
Hi Erin, I would look at: par("usr") to see what the range of the abscissa might be. Jim On Fri, Nov 25, 2016 at 2:03 PM, Erin Hodgess wrote: > Hello! Happy Thanksgiving to those who are celebrating. > > I have a zoo series that I am plotting, and I would like to

[R] abline with zoo series

2016-11-24 Thread Erin Hodgess
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: app1 <- get.hist.quote(instrument="appl", start="1985-01-01",end="2016-08-31",