A function to set the slot river
of an object of class
WaterLevelDataFrame.
Usage
setRiver(x) <- value
# S4 method for class 'WaterLevelDataFrame,character'
setRiver(x) <- value
Arguments
- x
an object of class WaterLevelDataFrame.
- value
a new value of class
character
for theriver
slot.value
has to have a length of one and has to be Elbe or Rhine.
Value
The function above sets a new value
for the slot river
and returns an object of class WaterLevelDataFrame. Since
river
is a slot relevant for the computation of the
data.frame
column w
, w
is set to
NA
and needs to be recomputed by functions like
waterLevel
or waterLevelPegelonline
.
Examples
wldf <- WaterLevelDataFrame(river = "Elbe",
time = as.POSIXct("2016-12-21"),
station = seq(500, 501, 0.1))
setRiver(wldf) <- as.character("Rhine")