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 subset it as I'd have done with data frames or matrices, but it didn't work (as the object is not a data frame nor a matrix). Cheers, Kevin ------------------------------------------------------------------------------ Ko-Kang Kevin Wang Postgraduate PGDipSci Student Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 towindow(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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._