Lane, Jim
2008-Aug-20 12:06 UTC
[R] How to concatenate values from a time series and a forecast
Hi, All I have a time series object: o1ts Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2005 56 58 67 68 69 71 78 78 2006 84 83 86 97 103 123 120 134 131 127 135 137 2007 142 138 141 151 155 173 181 188 195 191 262 273 2008 283 295 311 327 334 340 361 And a forecast derived from it:> o1faPoint Forecast Lo 95 Hi 95 Aug 2009 374 349 398 Sep 2009 386 350 423 Oct 2009 399 352 446 Nov 2009 412 354 469 Dec 2009 424 357 492 Jan 2009 437 359 515 Feb 2009 450 361 538 Mar 2009 463 364 562 Apr 2009 475 366 585 May 2009 488 367 609 Jun 2009 501 369 633 Jul 2010 513 370 657 Aug 2010 526 371 681 Sep 2010 539 372 705 Oct 2010 552 373 730 Nov 2010 564 373 755 Dec 2010 577 373 780 Jan 2010 590 373 806 Feb 2010 602 373 832 Mar 2010 615 373 857 Apr 2010 628 372 884 May 2010 640 371 910 Jun 2010 653 370 936 Jul 2010 666 368 963 I would like to get a single data frame combining the actual values from the time series with the predicted values from the forecast, each value with the corresponding month. How could I do this? TIA -Jim Lane _______________________________________________________________________ This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen. [[alternative HTML version deleted]]
Apparently Analagous Threads
- By= levels with the Hmisc summarize function.
- How to make a time series object from a data frame containing dates.
- How to create separate plots for all combinations of some factors
- How to apply a function to all combinations of the values of 2 or more variables?
- formula method with "special" characters