Butterworth: Butterworth Filter

Description Usage Arguments Details Value See Also

Description

Apply a Butterworth filter to data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Butterworth(x, ...)

## S3 method for class 'numeric'
Butterworth(x, samplingRate, order, cutoffs, type, ...)

## S3 method for class 'data.frame'
Butterworth(x, samplingRate, order, cutoffs, type, ...)

## S3 method for class 'list'
Butterworth(x, samplingRate, order, cutoffs, type, ...)

Arguments

x

A numeric vector or a data frame of numeric vectors.

...

Placeholder for future methods.

samplingRate

An atomic numeric, the sampling rate of x, in hertz.

order

An atomic numeric, the order of the filter.

cutoffs

A numeric vector, the critical frequencies of the filter, in hertz. For a low-pass or a high-pass filter, cutoffs should be of length 1, denoting the cutoff frequency of the filter. For a pass-band or stop-band filter, cutoffs should be of length 2, denoting the corner frequencies of the band.

type

A character string, either "low", "high", "pass", or "stop".

Details

Butterworth wraps signal::butter and signal::filtfilt, putting data arguments first so that filtering plays nice with the forward pipe. The filtering is done in the forward and reverse direction in order to remove phase distortion from one-pass filtering.

Value

The filtered data.

See Also

butter, filtfilt


patrickreidy/ag501 documentation built on May 30, 2019, 10:01 p.m.