diff --git a/R/readNWISdata.r b/R/readNWISdata.r index 28d2907ef28dfde27c255b6f5ebe190ffdb7e1e7..8b54a4cffca92f2b1a0fb21a7360adc8db4dc08d 100644 --- a/R/readNWISdata.r +++ b/R/readNWISdata.r @@ -50,6 +50,10 @@ readNWISdata <- function(service="dv", ...){ matchReturn <- list(...) + if(length(service) > 1){ + stop("Only one service call allowed.") + } + values <- sapply(matchReturn, function(x) URLencode(as.character(paste(eval(x),collapse=",",sep="")))) urlCall <- paste(paste(names(values),values,sep="="),collapse="&")