A function to set the slot time of an object of class
WaterLevelDataFrame.
Usage
setTime(x) <- value
# S4 method for class 'WaterLevelDataFrame,POSIXct'
setTime(x) <- value
# S4 method for class 'WaterLevelDataFrame,POSIXlt'
setTime(x) <- value
# S4 method for class 'WaterLevelDataFrame,Date'
setTime(x) <- valueArguments
- x
an object of class WaterLevelDataFrame.
- value
a new value of class
c("POSIXct", "POSIXt")for thetimeslot.valuehas to have a length of one and has to be in the temporal range between1960-01-01 00:00:00 CETand now (Sys.time()orNA.
Value
The function above sets a new value for the slot time
and returns an object of class WaterLevelDataFrame. Since
time 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(257, 262, 0.1))
setTime(wldf) <- as.POSIXct("2016-12-22")
