fviz: Plot amplitude and phase of linear filter

Description Usage Arguments Value Examples

View source: R/fviz.R

Description

Plot amplitude and phase of a linear filter

Usage

1
2
fviz(h, type = c("centered", "causal", "symmetric", "arma"),
  phase = TRUE, hide = FALSE, twoway = FALSE)

Arguments

h

filter coefficients; see details below

type

one of "centered", "causal", "symmetric" or "arma." The first three types assume h is a vector of filter coefficients. If type is "centered" these are centered around zero. If the filter length is even, the filter extends further to positive time. Type "causal" assumes coefficients start with time 0. Type "symmetric" assumes h provides the time >= 0 coefficients. These are mirrored for negative times. Type "arma" is for filters created in the signal package.

phase

include filter phase spectrum facet if true

hide

if true, function returns a list with with filter z transform (see below) and ggplot object

twoway

if true and filter type is ARMA, response is computed for two-way filter

Value

List with frequency "f" and z representation of filter "H"

Examples

1
2
f <- fdfilter( 5, 1 )
H <- fviz( f )

jrevenaugh/TSAUMN documentation built on Nov. 8, 2019, 2:20 p.m.