From pgilbert@bank-banque-canada.ca  Wed Sep 30 16:38:20 1998
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
Date: Wed, 30 Sep 1998 11:38:20 -0400
Subject: "tsp<-"
References: <199809301440.QAA04028@florence.ethz.ch>
Message-ID: <98Sep30.114258edt.13464@mailgate.bank-banque-canada.ca>

Martin

I think your fix clobbered mine for NULL assignment and when I went to test a
combined version I discovered that somewhere in the setting of the tsp attr
there is already the check you proposed, and also some other sanity checks. So
my fix for NULL assignment (below again) seems to be the only problem. "tsp<-"
might be a more logical place to put these checks then in attr, but that's a
different question.

Paul
______

        "tsp<-" <-function(x, value)
        {if (is.null(value))
           {attr(x, "tsp") <- value
            if(inherits(x,"ts")) class(x) <- NULL
            return(x)
           }
         attr(x, "tsp") <-  value
         class(x) <- "ts"
         x
        }



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


"tsp<-"
Paul Gilbert