From p.dalgaard@biostat.ku.dk  Thu May 13 19:07:23 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 13 May 1999 20:07:23 +0200
Subject: yet another ts problem
In-Reply-To: Paul Gilbert's message of Thu, 13 May 1999 11:25:15 -0400
References: <Pine.BSF.4.05.9905131005150.525-100000@g.ihaka.slip.auckland.ac.nz>
 <373A9D34.EE7511F9@iarc.fr> <373AEEDA.39CAAC16@bank-banque-canada.ca>
Message-ID: <x2pv44sv1g.fsf@biostat.ku.dk>

Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

> 
> Ross Ihaka wrote:
> 
> > 1. I think that "[.ts" tries too hard to turn its value back into
> >    a time series.  ...
> 
> I agree with this, although, despite all the bugs I'm reporting, a lot of "[.ts"
> works ok. All of my calls to "[.ts" that should try to preserve time series

Notice that there's a quickhack(TM) for the specific problem:

    y <- NextMethod("[")
    if (missing(i)) 
        ts(y, start = start(x), freq = frequency(x))
    else {
        n <- if (is.matrix(x)) 
            nrow(x)

insert "if (is.matrix(i)) return(y)" at the beginning of the else clause.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


yet another ts problem
Peter Dalgaard BSA