fullfilter: Filter functions for 'NetCDF' objects

Description Usage Arguments Examples

View source: R/filter.R

Description

fullfilter applies a moving average filter to the full time series (no missing values, decreasing filter length at start and end). applyfilter applies fullfilter to the time dimension of an object of class 'NetCDF'. make_filter helps you set up a low- band- or highpass filter with the desired response specified in desired_response. get_filter_weights provides the weights given a cutoff frequency. get_response can be used to illustrate and analyse the filter response.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
fullfilter(x, h)

applyfilter(x, h)

get_response(h, accuracy = 1e-05)

desired_response(fr, type = "lowpass", accuracy = 1e-05)

get_filter_weights(n, fr, accuracy = 1e-05)

make_filter(n, fr, type = "lowpass", ...)

filter9p(x)

smoother(x, df = 5)

Arguments

x

time series or 'NetCDF' object

h

filter weights

accuracy

numerical accuracy to which the response should be computed

fr

cutoff frequencies

type

one of lowpass, bandpass, or highpass

n

number of time steps used in digital filter

...

additional arguments passed to get_filter_weights

df

degrees of freedom for spline smoothing

Examples

1
2
3
4
5
6
xx <- rnorm(100) + sin(seq(0,4*pi, length=100))
plot(xx, type='l')
hh <- make_filter(31, 10, type='lowpass')
lines(filter(xx, hh), lwd=2)
plot(get_response(hh), type='l')
abline(v=1/10, lty=2, lwd=2)

jonasbhend/geoutils documentation built on May 19, 2019, 7:27 p.m.