be_visual_data: be_visual_data

Description Usage Arguments Value Examples

View source: R/be_visual.R

Description

Generate dataset for comparing barometric efficiency

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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/waterlevel documentation built on Dec. 1, 2019, 6:24 p.m.