[R] extend.series not zero padding

From: Keith Chamberlain <Keith.Chamberlain_at_colorado.edu>
Date: Tue 06 Dec 2005 - 16:45:25 EST


Dear List,

I was trying to verify that I could use extend.series in the wavelets package and kept getting an error when trying to use method="zero". I'm not seeing where my syntax has gone awry.

According to the documentation, [see ?extend.series] " method: A character string indicating which extension method to use.

          Possible values are '"periodic"', '"reflection"', '"zero"',
          '"mean"', and '"reflection.inverse"'."

c<-cbind(0:60, 60:0) # setup a series, length will be 61
> length(c)

[1] 122

>dew<-extend.series(c,method="zero",length="powerof2",
j=log(length(c),2)%/%1)
>Error in extend.series(c, method = "zero", length = "powerof2", j =
log(length(c), :

        Invalid argument value for 'method'

Other methods work great, such as method="mean".

> dew<-extend.series(c,method="mean",length="powerof2",
j=log(length(c),2)%/%1)
>

> length(dew)

[1] 128
>

Has this come up in anyone else's experience? If so, what's the workaround so that I can use "zero" as a method?

Rgds,
KeithC.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Dec 06 16:46:49 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:29 EST