Skip to contents

Calculates the transfer function with pgram results.

Usage

step_fft_transfer_pgram(
  .rec,
  terms,
  spans = 3,
  detrend = TRUE,
  demean = TRUE,
  taper = 0.1,
  time_step = 1,
  formula = NULL,
  role = "augment",
  ...
)

Arguments

.rec

the R6 recipe object.

terms

the unquoted names of the variables to use or a selector function. terms replaces the `...` of the recipes package but requires variables to be included within `c()`. For example to include variables x and y you would write `c(x,y)` in the hydrorecipes package.

spans

vector of odd integers giving the widths of modified Daniell smoothers to be used to smooth the periodogram.

detrend

logical. If TRUE, remove a linear trend from the series. This will also remove the mean.

demean

logical. If TRUE, subtract the mean of the series.

taper

specifies the proportion of data to taper. A split cosine bell taper is applied to this proportion of the data at the beginning and end of the series.

time_step

numeric monitoring interval size

formula

formula notation to specify inputs and outputs

role

character - the name of the role

...

additional arguments

Value

an updated recipe

Examples

data(kennel_2020)

form <- as.formula("wl~.")

rec <- recipe(form, kennel_2020) |>
       step_fft_transfer_pgram(c(wl, baro, et), spans = 3) |>
       plate()