To initialize an object of class WaterLevelDataFrame this function should be used. It checks all the required input data and validates the final object.
Usage
WaterLevelDataFrame(
river = c("Elbe", "Rhine"),
time,
gauging_stations = NULL,
gauging_stations_missing = NULL,
comment = NULL,
id = NULL,
station = NULL,
station_int = NULL,
w = NULL
)Arguments
- river
a required argument to fill the WaterLevelDataFrame-slot
river. It has to be typecharacter, has to have a length of one and can be either Elbe or Rhine.- time
a required argument to fill the WaterLevelDataFrame-slot
time. It has to be typec("POSIXct", "POSIXt"), has to have a length of one and must be in the temporal range between1960-01-01 00:00:00 CETand now (Sys.time()) or beNA.- gauging_stations
a slot of class
data.frame.gauging_stationshas to be adata.framewith the following columns and column types: id (integer), gauging_station (character), uuid (character), km (numeric), km_qps (numeric), river (character), longitude (numeric), latitude (numeric), mw (numeric), pnp (numeric), w (numeric), wl (numeric), n_wls_below_w_do (integer), n_wls_above_w_do (integer), n_wls_below_w_up (integer), n_wls_above_w_up (integer), name_wl_below_w_do (character), name_wl_above_w_do (character), name_wl_below_w_up (character), name_wl_above_w_up (character), w_wl_below_w_do (numeric), w_wl_above_w_do (numeric), w_wl_below_w_up (numeric), w_wl_above_w_up (numeric), weight_up (numeric), weight_do (numeric).- gauging_stations_missing
an optional argument to fill the WaterLevelDataFrame-slot
gauging_stations_missing. It has to be typecharacterand usually contains a vector with names of gauging stations for which no water level information was available for the specifiedtime. This argument is used by the functionswaterLevel,waterLevelPegelonline,waterLevelFlys3andwaterLevelFlys3Seq.- comment
an optional argument to fill the WaterLevelDataFrame-slot
comment. It has to be typecharacterand is used by the functionsWaterLevelDataFrame,waterLevel,waterLevelPegelonline,waterLevelFlys3andwaterLevelFlys3Seq.- id
an optional argument to hand over the
row.names(wldf).idhas to be typeintegerand has to have the same length as other optional arguments (station,station_intandw) forming thedata.frame-component of a WaterLevelDataFrame.- station
an optional argument to hand over the stationing along the specified
river. If specified, it has to be typenumericand has to have the same length as other optional arguments (id,station_intandw) forming thedata.frame-component of a WaterLevelDataFrame. If both stationing arguments (stationandstation_int) are specified, all elements ofstationhave to be equal toas.numeric(station_int / 1000). Minimum and maximum allowed values ofstationareriver-specific: Elbe (km 0 - 585.7), Rhine (km 336.2 - 865.7).- station_int
an optional argument to hand over the stationing along the specified
river. If specified, it has to be typeintegerand has to have the same length as other optional arguments (id,stationandw) forming thedata.frame-component of a WaterLevelDataFrame. If both stationing arguments (stationandstation_int) are specified, all elements ofstation_inthave to be equal toas.integer(station * 1000). Minimum and maximum allowed values ofstation_intareriver-specific: Elbe (m 0 - 585700), Rhine (m 336200 - 865700).- w
an optional argument to hand over the water level information along the stationing of the specified
riverfor a giventime. If specified, it has to be typenumericand has to have the same length as other optional arguments (id,stationandstation_int) forming thedata.frame-component of a WaterLevelDataFrame. If not specified, the respective WaterLevelDataFrame-columnwcan be computed by the functionswaterLevel,waterLevelPegelonline,waterLevelFlys3andwaterLevelFlys3Seq. Minimum and maximum allowed values ofware river-specific: Elbe (m a.s.l. 0 - 130), Rhine (m a.s.l. 5 - 120).
Value
The function produces an object of class WaterLevelDataFrame which might contain 1d water level data and information to recompute it.
Examples
wldf <- WaterLevelDataFrame(river = "Elbe",
time = as.POSIXct("2016-12-21"),
station = seq(257, 262, 0.1))
wldf <- waterLevel(wldf)
