step_baro_least_squares: step_baro_clark

View source: R/api_recipes.R

step_baro_least_squaresR Documentation

step_baro_clark

Description

Least squares solution for calculating barometric efficiency

Usage

step_baro_least_squares(
  .rec,
  water_level,
  barometric_pressure,
  lag_space = 1L,
  inverse = FALSE,
  differences = FALSE,
  role = "augment",
  ...
)

Arguments

.rec

the R6 recipe object.

lag_space

integer spacing for lags, useful for higher frequency monitoring

inverse

logical whether the barometric relationship is inverse

differences

numeric vector number of samples between differences

role

character - the name of the role

...

additional arguments

Value

barometric efficiency using least squares

See Also

Other barometric: step_baro_clark(), step_baro_harmonic()

Examples


data(kennel_2020)

least_squares <- recipe(wl~., kennel_2020) |>
  step_baro_least_squares(wl, baro) |> # 1 minutes (every minute differences)
  step_baro_least_squares(wl, baro, lag_space = 1440, differences = TRUE) |> # 1440 minutes (daily differences)
  prep() |>
  bake()

least_squares$get_step_data("barometric_efficiency")


jkennel/hydrorecipes documentation built on Dec. 24, 2024, 5:38 p.m.