names<-,WaterLevelDataFrame,character-method {hyd1d} | R Documentation |
Function to get or set the column names of an object of class WaterLevelDataFrame.
## S4 replacement method for signature 'WaterLevelDataFrame,character'
names(x) <- value
x |
an object of class WaterLevelDataFrame. |
value |
a character vector of up to the same length as |
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.)
To access the slot names of an object of class
WaterLevelDataFrame the function
slotNames
has to be used.
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")