If you give waterseries() a vector of labels, you get the following needless warning:
Warning message:
In if (is.na(labels)) labels <- switch(by, none = "", char = getCharInfo(object, :
the condition has length > 1 and only the first element will be used
This is due to the is.na being evaluated for each element in the labels vector. This should be changed to check to see if there is anyNA in the vector.
If you give
waterseries()
a vector of labels, you get the following needless warning:This is due to the
is.na
being evaluated for each element in thelabels
vector. This should be changed to check to see if there isanyNA
in the vector.