[Rd] diff.default / diff.ts in wrong package bug (PR#640)

maechler@stat.math.ethz.ch maechler@stat.math.ethz.ch
Mon, 21 Aug 2000 18:28:22 +0200 (MET DST)


{all recent versions of R}

Problem / design bug :

  diff.default() doesn't deal with "ts" objects properly,
  diff.ts() does, but that is only available from package "ts"
  where as the constructor function ts() is in base.

It's not sufficient to just move diff.ts() to package base,
since it relies itself on lag & lag.default which are also only in package 
ts.

----------------------------------------------------

A simple example :

> diff(ts(1:50, start= 1980, frequency = 12))
Error in tsp<-(*tmp*, value = c(xtsp[1] + lag * differences * xtsp[3],  : 
	invalid time series parameters specified

> library(ts)

> diff(ts(1:50, start= 1980, frequency = 12))
     Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1980       1   1   1   1   1   1   1   1   1   1   1
1981   1   1   1   1   1   1   1   1   1   1   1   1
1982   1   1   1   1   1   1   1   1   1   1   1   1
1983   1   1   1   1   1   1   1   1   1   1   1   1
1984   1   1                                        

------
Martin

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