yet another ts problem

Martyn Plummer plummer@iarc.fr
Thu, 13 May 1999 11:36:52 +0200


Ross Ihaka wrote:

> 1. I think that "[.ts" tries too hard to turn its value back into
>    a time series.  The only case where this makes sense is when
>    a selection of columns is taken from a multivariate series.
>    If a row subset is taken, it can only be a time series if
>    the subscripts have a very special pattern.  This would be
>    too expensive I think.
> 
>    In S there is no "[.ts", and a simple array subset is returned.

An alternative to using "[.ts" to take row subsets would be to 
expand the window.ts() function to include a "freq" or "deltat"
argument. One can then use window() to thin out a regular time series
and "[.ts" could be modified to just return a simple array subset
(in the process get rid of the horrible warning about not returning a
time series).

I already did something like this in the coda package for MCMC output -
which one often wants to thin out because of high autocorrelation.

Martyn
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._