swdft: Sliding Window Discrete Fourier Transform

Description Usage Arguments Value Examples

View source: R/swdft.R

Description

Sliding Window Discrete Fourier Transform

Usage

1
2
swdft(x, n, type = "fftw", pad = TRUE, taper_type = "none",
  p = 0.1, smooth = "none", m = 2, num_convs = 1)

Arguments

x

real or complex vector

n

integer window size.

type

algorithm to implement. defaults to "fftw", other option 'fft' for R's base FFT function. R's base fft function is used if

pad

optionally zero-pad the array to that the output array has the same dimension as the original time-series

taper_type

type of taper for each window position. defaults to 'none', can also be 'cosine'.

p

Proportion to be tapered at each end of the series. Argument copied from the spec.taper function in the default stats package. Defaults to .1.

smooth

Type of smoother. Defaults to 'none', can also be 'daniell' or 'modified daniell'. If smooth is 'none', then the SWDFT returns the smoothed squared modulus coefficients, not the complex numbers

m

width of kernel. Defaults to 2

num_convs

Number of times to convolve the kernel. Defaults to 1

Value

An S3 'swdft' object. See ?new_swdft for details.

Examples

1
2
x <- rnorm(n = 20)
a <- swdft(x, n = 2^3)

swdft documentation built on May 2, 2019, 2:27 a.m.