NCRN / NCRNWater

R Package for analyzing NCRN-NPS water data
4 stars 7 forks source link

Fix needless warning from waterseries() #9

Closed johnpauls closed 5 years ago

johnpauls commented 5 years ago

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.