padding function

Padding data to dyadic sample size

Padding data to dyadic sample size

padding(x, pad = c("per", "zero", "sym"))

Arguments

  • x: A vector or time series containing the data be to decomposed.
  • pad: Method for padding, including periodic, zero and symetric padding.

Returns

A dyadic length (power of 2) vector or time series.

Examples

x <- rnorm(360) x1 <- padding(x, pad = "per") x2 <- padding(x, pad = "zero") x3 <- padding(x, pad = "sym") ts.plot(cbind(x, x1, x2, x3), col = 1:4)