Skip to content
Prev 13309 / 63424 Next

Subsetting time series

On Tue, 10 Aug 2004, Ross Ihaka wrote:

            
There is a [.ts, in src/library/stats/R/ts.R, and it is documented 
(?"[.ts").
Yes.  If you look in the sources for [.ts you will see, commented, the
code that was once there to handle cases where the index was evenly
spaced.  But it was removed long ago in favour of window().  I tried to
consult the logs, but it seems that in the shift from CVS to SVN recently
I can't get at them.  I think the rationale was that x[ind] should always
produce an object of the same class.