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

Check for url existence in construct function.

parent f5f66773
No related branches found
No related tags found
1 merge request!35Fixed sample user file function.
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#' @keywords data import USGS web service #' @keywords data import USGS web service
#' @return url string #' @return url string
#' @export #' @export
#' @import RCurl
#' @examples #' @examples
#' siteNumber <- '01594440' #' siteNumber <- '01594440'
#' startDate <- '1985-01-01' #' startDate <- '1985-01-01'
...@@ -181,6 +182,10 @@ constructNWISURL <- function(siteNumber,parameterCd,startDate,endDate,service,st ...@@ -181,6 +182,10 @@ constructNWISURL <- function(siteNumber,parameterCd,startDate,endDate,service,st
} }
) )
if(url.exists(url)){
return(url) return(url)
} else {
stop("The following url doesn't seem to exist:\n",url)
}
} }
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