[R] tframe question - latest.start

Paul Gilbert pgilbert at bank-banque-canada.ca
Thu May 24 21:38:41 CEST 2001


Jason

There is a serious error in the tframe documentation which I will fix. Thanks for
point out that it seems "a bit cloudy." The functions earliest.start and latest.start
work on multiple time series objects (and have nothing to do with NAs in any of
them).  The following example should help.

> library(ts)
> library(tframe)
Loading required package: syskern
> t1<-ts(c(1,2,3,4,5),        start=c(1991,1))
> t2<-ts(c(2,3,4,5,6,7,8),  start=c(1992,1))
> t3<-ts(c(NA,2,3,4,5),     start=c(1991,1))

> latest.start(t1,t2,t3)  # 1992 1 corresponding to the starting date of
                                    # the object which starts latest (t2)
[1] 1992    1
> latest.start(t1,t3)     # both start in 1991 1  (NAs count as data)
[1] 1991    1
> latest.start.index(t1,t2,t3)  # position of t2 in the argument list
[1] 2
> latest.start(tbind(t1,t2,t3)) # tbind gives a single object starting in 1991 1
[1] 1991    1
> latest.start(t2, tbind(t1,t2,t3))
[1] 1992    1

I ran this  with R 1.3.0 (devel) and my most recent version of tframe, but you should
not find any difference in the version you have.

Paul Gilbert

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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