Skip to content
Snippets Groups Projects
Commit 978bd432 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

More robust.

parent 0ec543fd
No related branches found
No related tags found
1 merge request!39Overhaul of function names. Move some functionality to EGRET.
...@@ -44,7 +44,7 @@ constructNWISURL <- function(siteNumber,parameterCd="00060",startDate="",endDate ...@@ -44,7 +44,7 @@ constructNWISURL <- function(siteNumber,parameterCd="00060",startDate="",endDate
service <- match.arg(service, c("dv","uv","iv","qw","gwlevels","rating","peak","meas")) service <- match.arg(service, c("dv","uv","iv","qw","gwlevels","rating","peak","meas"))
if(!is.na(parameterCd)){ if(any(!is.na(parameterCd))){
pcodeCheck <- all(nchar(parameterCd) == 5) & all(!is.na(suppressWarnings(as.numeric(parameterCd)))) pcodeCheck <- all(nchar(parameterCd) == 5) & all(!is.na(suppressWarnings(as.numeric(parameterCd))))
if(!pcodeCheck){ if(!pcodeCheck){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment