[R] Time Series Row Label
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Dec 10 22:31:32 CET 2010
On Fri, Dec 10, 2010 at 3:16 PM, dreadgazebo <ernie.tedeschi at gmail.com> wrote:
>
> Simple question...
>
> I know that when referencing data in a multivariate time series matrix, I
> can use the variable name instead of the column number (such as
> budget.ts[4,"incometax"]). Is there a way I can use the time unit (say, the
> year in an annual time series) instead of the row number?
You can use window(), e.g.
tt <- ts(1:4, start = 2000)
window(tt, start = 2001, end = 2002)
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
More information about the R-help
mailing list