be_correct: be_correct

View source: R/be_visual.R

be_correctR Documentation

be_correct

Description

Adjust values based on the barometric efficiency

Usage

be_correct(
  dat,
  dep = "wl",
  ind = "baro",
  be = 0,
  inverse = TRUE,
  known_mean = NULL
)

Arguments

be

numeric value of the barometric efficiency

known_mean

numeric explicitly enter the mean if known. Otherwise estimate from data.

Value

numeric vector of corrected values

Examples

library(data.table)
baro = rnorm(1000, sd = 0.01) + 9
wl <- baro * 0.4 + 18
dat <- data.table(baro, wl)
dat$wl + be_correct(dat, be=0.4, inverse = FALSE)
dat$wl + be_correct(dat, be=0.4, inverse = FALSE, known_mean = 9)
# should return ~21.6 = 18 + 0.4 * 9


jkennel/hydrorecipes documentation built on April 17, 2025, 4 p.m.