From jschenck at cisco.com  Tue Sep  9 02:25:34 2008
From: jschenck at cisco.com (jschenck at cisco.com)
Date: Tue,  9 Sep 2008 02:25:34 +0200 (CEST)
Subject: [Rd] package "signal", function "filter" (PR#12752)
Message-ID: <20080909002534.ED069282EFF6@mail.pubhealth.ku.dk>

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



[Rd] package "signal", function "filter" (PR#12752)
jschenck at cisco.com