be_visual_data: be_visual_data

View source: R/be_visual.R

be_visual_dataR Documentation

be_visual_data

Description

Generate dataset for comparing barometric efficiency

Usage

be_visual_data(
  dat,
  dep = "wl",
  ind = "baro",
  be_tests = seq(0, 1, 0.1),
  inverse = TRUE
)

Arguments

dat

data that has the independent and dependent variables (data.table)

dep

name of the dependent variable column (character). This is typically the name for the column holding your water level data.

ind

name of the independent variable column (character). This is typically the name for the column holding your barometric pressure data.

be_tests

vector of barometric efficiencies to test (between 0 and 1) (numeric)

inverse

whether the barometric relationship is inverse (TRUE means that when the barometric pressure goes up the measured water level goes down (vented transducer, depth to water), FALSE means that when the barometric pressure goes up so does the measured pressure (non-vented transducer)) (logical).

Value

data.table of barometric efficiency compensated datasets

Examples

library(data.table)
be <- 0.43
x <- seq(0, 28*pi, pi / (12*12))

baro <- sin(x) + rnorm(length(x), sd = 0.04)
wl <- -sin(x) * be + rnorm(length(x), sd = 0.04)
dat <- data.table(datetime = as.POSIXct(x * 86400 / (2 * pi),
                                        origin = '1970-01-01', tz = 'UTC'),
                  wl = wl, baro = baro)
be_visual_data(dat)


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