[R] ts() object

Dirk Eddelbuettel edd at debian.org
Thu Oct 3 05:15:35 CEST 2002


On Thu, Oct 03, 2002 at 12:48:13PM +1200, Ko-Kang Kevin Wang wrote:
> Hi,
> 
> Suppose I got a ts() object that looks like:
>       Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
> 1983  587  498  617  502  566  495  500  522  592  574  629  400
> 1984  620  545  550  500  604  533  547  596  530  616  672  412
> 1985  625  497  624  540  645  493  604  610  505  650  633  403
> 
> and I'd like to extract out 1984 data.  How can I do it?  I tried to

window(my.ts, start=c(1984,1), end=c(1984,12))

Dirk

-- 
Good judgement comes from experience; experience comes from bad judgement. 
							    -- Fred Brooks
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list