validateAndFillHydraulicData: Validate and Fill Hydraulic Data

Description Usage Arguments

View source: R/validation.R

Description

1. remove rows with duplicate timestamps 2. fill gaps within hydraulic events given by time intervals exceeding H threshold

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
validateAndFillHydraulicData(hydraulicData,
  tstep.fill.s = selectElements(settings, "tstep.fill.s"),
  replaceMissingQMethod = selectElements(settings,
  "replaceMissingQMethod"),
  regressionModels = selectElements(selectElements(settings,
  "regression"), "models")[[selectElements(settings, "station")]],
  regressionUsage = selectElements(selectElements(settings,
  "regression"), "usage")[[selectElements(settings, "station")]],
  hydraulicEvents = NULL, additionalColumns = NULL,
  modelDir = getOrCreatePath("REGRESSION_DIR", selectElements(settings,
  "dictionary")), settings = NULL)

Arguments

hydraulicData

data frame with column DateTime, ...

tstep.fill.s

target time step in seconds. Time gaps in hydraulicData will be filled with interpolated values

replaceMissingQMethod

one of c("interpolate", "predict"). "interpolate": linear interpolation "predict": prediction from water levels using a saved square regression

regressionModels

data frame with character columns from, to (or POSIXct columns tBeg and tEnd) and modelFile determining the time intervals to which the different correlation models are assigned.

regressionUsage

data frame with character columns from, to (or POSIXct columns tBeg and tEnd) defining the first and last timestamp of the time intervals in which the correlation is to be used

hydraulicEvents

hydraulic events

additionalColumns

columns additional to "DateTime", "H" and "Q" to be selected from hydraulicData

modelDir

full path to the directory where the model files (of the current station) are stored)

settings

settings as returned by configure. Will be used to lookup function parameters for which no values have been given (see defaults)


KWB-R/kwb.monitoring documentation built on May 17, 2019, 1:06 p.m.