Description Usage Arguments Details Value Note See Also
View source: R/low_pass_filter.R
low_pass_filter
implements a low-pass third-order Butterworth filter.
1 | low_pass_filter(ts, samp_freq, filter_freq = 4)
|
ts |
A time series, passed as a vector of chronologically ordered observations separated by equal intervals of time. |
samp_freq |
Sampling frequency in Hz. |
filter_freq |
Frequency of the low pass filter. The default value of 4 Hz is recommended for pupil dilation. |
This function serves as a wrapper around butter
and
filter
that combines filter construction and
implementation and allows the user to specify the filter in terms of the
original sampling frequency in Hz and the desired filter in Hz, without
having to specify the filter in terms of a fraction of the Nyquist filter.
This function also simplifies the output of the call to
filter
by converting it into a numerical vector,
which can then be used to replace the original time series in a data frame.
A low-pass-filtered copy of the time series.
The low-pass filter assumes that the signal should start from 0, and it will always return a time series that starts from 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.