be_high_low.Rd
Uses the maximum and minimum values for a time period to calculate be.
be_high_low(dat, dep = "wl", ind = "baro", time = "datetime", time_group = "%Y-%m-%d")
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. |
time | name of the column containing the time (character) |
time_group | format for grouping time (ie: "%Y-%m-%d") (character) |
barometric efficiency based on high and low values
library(data.table) datetime <- seq.POSIXt(as.POSIXct("2016-01-01 00:00:00", tz = 'UTC'), as.POSIXct("2016-01-06 00:00:00", tz = 'UTC'), by='hour') baro <- sin(seq(0, 2*pi, length.out = length(datetime))) wl <- 0.4 * baro + rnorm(length(datetime), sd = 0.01) dat <- data.table(baro, wl, datetime) be_hl <- be_high_low(dat)#> Warning: Column 'group' does not exist to removebe_hl <- be_high_low(dat, time_group = 86400)