jschenck at cisco.com
2008-Sep-09 00:25 UTC
[Rd] package "signal", function "filter" (PR#12752)
Full_Name: Jeff Schenck Version: 2.6.2 (signal v. 0.5) OS: Windows XP Submission from: (NULL) (128.107.248.220) The "filter" function in the package "signal" does not properly handle recursive filters with only two feedback taps. I looked at the source code in filter.R. There is a line that says "if (length(a) > 2)" that I think should have ">=". I tried it that way and it seems to work fine. FYI... My test filter was a DC notch: b <- c(1, -1) a <- c(1, -0.95) y <- filter(b, a, x) Thanks, Jeff Schenck
ripley at stats.ox.ac.uk
2008-Sep-09 07:30 UTC
[Rd] package "signal", function "filter" (PR#12752)
Package 'signal' is not the responsibility of the R developers, so you need to follow the FAQ and report this to the maintainer, rather than clog up R-bgs with an inappopriate report. You might find that R's own function filter() is better written. The FAQ also asks you not to report on long obsolete versions of R. On Tue, 9 Sep 2008, jschenck at cisco.com wrote:> Full_Name: Jeff Schenck > Version: 2.6.2 (signal v. 0.5) > OS: Windows XP > Submission from: (NULL) (128.107.248.220) > > > The "filter" function in the package "signal" does not properly handle recursive > filters with only two feedback taps. I looked at the source code in filter.R. > There is a line that says "if (length(a) > 2)" that I think should have ">=". I > tried it that way and it seems to work fine. > > FYI... My test filter was a DC notch: > b <- c(1, -1) > a <- c(1, -0.95) > y <- filter(b, a, x) > > Thanks, > Jeff Schenck > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595