[R] ts time-object indexing question?

ce zadig_1 at excite.com
Mon Feb 15 16:53:23 CET 2016


Dear all, 

I can't find an answer to this simple question:

 a.ts <- ts(1:10, frequency = 1, start = c(1959, 1))
 > a.ts
Time Series:
Start = 1959
End = 1968
Frequency = 1
 [1]  1  2  3  4  5  6  7  8  9 10

Now I want to get let's say value for 1965 , how to get it ?
> a.ts["1965"]
[1] NA

doesn't work . 

And  how I can get the date of a.ts[5]  ?



More information about the R-help mailing list