Try this: plot(window(x, end = c(2006, 10)))
On Tue, Mar 2, 2010 at 2:19 AM, Erin Hodgess <erinm.hodg...@gmail.com> wrote: > Dear R People: > > I have the following time series and plot: >> x <- ts(rnorm(50),start=2005,freq=12) >> plot(x) >> > > which works fine. > > I would like to plot a subset of that time series, which I did with: >> plot(window(x,2005,2006.83)) > > Is there a better way to do this, please? > > Thanks, > Erin > > > > -- > Erin Hodgess > Associate Professor > Department of Computer and Mathematical Sciences > University of Houston - Downtown > mailto: erinm.hodg...@gmail.com > > ______________________________________________ > 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. > ______________________________________________ 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.