Skip to contents

A function to set the slot gauging_stations of an object of class WaterLevelDataFrame.

Usage

setGaugingStations(x) <- value

# S4 method for class 'WaterLevelDataFrame,data.frame'
setGaugingStations(x) <- value

Arguments

x

an object of class WaterLevelDataFrame.

value

a new value of class data.frame for the gauging_stations slot. value has to be a data.frame with the following columns and column types: id (integer), gauging_station (character), uuid (character), km (numeric), km_qps (numeric), water_shortname (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).

Value

The function sets a new value for the slot gauging_stations and returns an object of class WaterLevelDataFrame. Since value is normally generated inside the functions waterLevel or waterLevelPegelonline this function is of very little use outside these functions.

Examples

wldf <- WaterLevelDataFrame(river   = "Elbe",
                            time    = as.POSIXct("2016-12-21"),
                            station = seq(257, 262, 0.1))
wldf <- waterLevel(wldf)

df <- data.frame(id = integer(),
                 gauging_station    = character(),
                 uuid               = character(),
                 km                 = numeric(),
                 km_qps             = numeric(),
                 river              = character(),
                 longitude          = numeric(),
                 latitude           = numeric(),
                 mw                 = numeric(),
                 mw_timespan        = character(),
                 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(),
                 stringsAsFactors   = FALSE)
setGaugingStations(wldf) <- df