Skip to contents

Function to get or set the column names of an object of class WaterLevelDataFrame.

Usage

# S4 method for class 'WaterLevelDataFrame,character'
names(x) <- value

Arguments

x

an object of class WaterLevelDataFrame.

value

a character vector of up to the same length as ncol(x). Since the names of the first three columns of an object of class WaterLevelDataFrame are predetermined ("station", "station_int", "w") only the later names of additional columns can be modified.

Value

For names, a character vector of the same length as ncol(x).

For names<-, the updated object. (Note that the value of names(x) <- value is that of the assignment, value, not the return value from the left-hand side.)

Note

To access the slot names of an object of class WaterLevelDataFrame the function slotNames has to be used.

See also

Examples

wldf <- WaterLevelDataFrame(river   = "Elbe",
                            time    = as.POSIXct("2016-12-21"),
                            station = seq(257, 262, 0.1))
wldf <- waterLevel(wldf, TRUE)
names(wldf) <- c(names(wldf)[1:5], "WEIGHT_Y")