fftdecimate: Downsample timeseries

Description Usage Arguments Value Examples

View source: R/fftresample.R

Description

Downsample a timeseries using FFT

Usage

1
fftdecimate(s, nfac = 2, pct = 0.025, deltat = 1)

Arguments

s

timeseries (as a ts object or vector of samples)

nfac

downsampling factor (integer greater than 1)

pct

percent length of timeseries used for cosine-squared taper of ends. This reduces edge effects, but is lossy.

deltat

sampling interval; used only if s is not a ts object

Value

resampled timeseries.

Examples

1
2
3
4
s <- ts( sin( 2 * pi * 1:1000 / 200 ), deltat = 0.1 )
ds <- fftdecimate( s, nfac = 10 )
plot( s, type = "l" )
lines( ds, col = "red" )

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