From e28e177c32c98f6cb51ec025999b68c5de76b0ef Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Thu, 29 Jan 2015 10:13:27 -0600
Subject: [PATCH] Getting rid of all external server calls.

---
 R/getWebServiceData.R        | 2 ++
 R/importRDB1.r               | 3 ++-
 R/importWaterML2.r           | 7 +------
 R/readNWISunit.r             | 4 ++--
 R/renameColumns.R            | 2 ++
 R/tabbedDataRetrievals.R     | 4 ++--
 R/whatNWISsites.R            | 2 ++
 man/dataRetrieval-package.Rd | 4 ++--
 man/getWebServiceData.Rd     | 2 ++
 man/importRDB1.Rd            | 3 ++-
 man/importWaterML2.Rd        | 8 +-------
 man/readNWISuv.Rd            | 4 ++--
 man/renameNWISColumns.Rd     | 2 ++
 man/whatNWISsites.Rd         | 2 ++
 14 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/R/getWebServiceData.R b/R/getWebServiceData.R
index 57e77cfc..5405b4b9 100644
--- a/R/getWebServiceData.R
+++ b/R/getWebServiceData.R
@@ -14,7 +14,9 @@
 #' offering <- '00003'
 #' property <- '00060'
 #' obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
+#' \dontrun{
 #' rawData <- getWebServiceData(obs_url)
+#' }
 getWebServiceData <- function(obs_url){
   possibleError <- tryCatch({
     h <- basicHeaderGatherer()
diff --git a/R/importRDB1.r b/R/importRDB1.r
index 743c09c0..83b636b2 100644
--- a/R/importRDB1.r
+++ b/R/importRDB1.r
@@ -49,8 +49,9 @@
 #' 
 #' obs_url <- constructNWISURL(siteNumber,property,
 #'          startDate,endDate,"dv",format="tsv")
-#' data <- importRDB1(obs_url)
 #' \dontrun{
+#' data <- importRDB1(obs_url)
+#' 
 #' urlMultiPcodes <- constructNWISURL("04085427",c("00060","00010"),
 #'          startDate,endDate,"dv",statCd=c("00003","00001"),"tsv")
 #' multiData <- importRDB1(urlMultiPcodes)
diff --git a/R/importWaterML2.r b/R/importWaterML2.r
index 0abf9e83..d46c1f16 100644
--- a/R/importWaterML2.r
+++ b/R/importWaterML2.r
@@ -35,17 +35,12 @@
 #'   "statCd=00003",
 #'   "parameterCd=00060",sep="&")
 #' dataReturnMulti <- importWaterML2(URLmulti)
-#' 
-#' filePath <- system.file("extdata", package="dataRetrieval")
-#' fileName <- "WaterML2Example.xml"
-#' fullPath <- file.path(filePath, fileName)
-#' UserData <- importWaterML2(fullPath)
 #' }
 #' filePath <- system.file("extdata", package="dataRetrieval")
 #' fileName <- "WaterML2Example.xml"
 #' fullPath <- file.path(filePath, fileName)
+#' UserData <- importWaterML2(fullPath)
 #' 
-#' fileData <- importWaterML2(fullPath)
 importWaterML2 <- function(obs_url, asDateTime=FALSE, tz=""){
   
   if(file.exists(obs_url)){
diff --git a/R/readNWISunit.r b/R/readNWISunit.r
index 1662a8da..902fd531 100644
--- a/R/readNWISunit.r
+++ b/R/readNWISunit.r
@@ -49,9 +49,9 @@
 #' parameterCd <- '00060'
 #' startDate <- "2014-10-10"
 #' endDate <- "2014-10-10"
-#' # These examples require an internet connection to run
-#' rawData <- readNWISuv(siteNumber,parameterCd,startDate,endDate)
 #' \dontrun{
+#' rawData <- readNWISuv(siteNumber,parameterCd,startDate,endDate)
+#' 
 #' timeZoneChange <- readNWISuv(c('04024430','04024000'),parameterCd,
 #'          "2013-11-03","2013-11-03")
 #' }
diff --git a/R/renameColumns.R b/R/renameColumns.R
index 480c805f..e98ec7e3 100644
--- a/R/renameColumns.R
+++ b/R/renameColumns.R
@@ -42,9 +42,11 @@
 #' siteWithTwo <- '01480015'
 #' startDate <- "2012-09-01"
 #' endDate <- "2012-10-01"
+#' \dontrun{
 #' url2 <- constructNWISURL(siteWithTwo, "00060",startDate,endDate,'dv')
 #' twoResults <- importWaterML1(url2,TRUE)
 #' twoResults <- renameNWISColumns(twoResults)
+#' }
 renameNWISColumns <- function(rawData, p00010="Wtemp", p00045="Precip",
                           p00060="Flow", p00065="GH", p00095="SpecCond", p00300="DO",
                           p00400="pH", p62611="GWL", p63680="Turb", p72019="WLBLS",
diff --git a/R/tabbedDataRetrievals.R b/R/tabbedDataRetrievals.R
index 52ec0426..d21e64cf 100644
--- a/R/tabbedDataRetrievals.R
+++ b/R/tabbedDataRetrievals.R
@@ -3,8 +3,8 @@
 #' \tabular{ll}{
 #' Package: \tab dataRetrieval\cr
 #' Type: \tab Package\cr
-#' Version: \tab 2.0.2\cr
-#' Date: \tab 2014-12-15\cr
+#' Version: \tab 2.1.1\cr
+#' Date: \tab 2015-01-29\cr
 #' License: \tab Unlimited for this package, dependencies have more restrictive licensing.\cr
 #' Copyright: \tab This software is in the public domain because it contains materials
 #' that originally came from the United States Geological Survey, an agency of
diff --git a/R/whatNWISsites.R b/R/whatNWISsites.R
index 83d9707e..82c847f4 100644
--- a/R/whatNWISsites.R
+++ b/R/whatNWISsites.R
@@ -27,7 +27,9 @@
 #' @export
 #' @import XML
 #' @examples
+#' \dontrun{
 #' siteListPhos <- whatNWISsites(stateCd="OH",parameterCd="00665")
+#' }
 whatNWISsites <- function(...){
   
   matchReturn <- list(...)
diff --git a/man/dataRetrieval-package.Rd b/man/dataRetrieval-package.Rd
index f60dfad9..4756b365 100644
--- a/man/dataRetrieval-package.Rd
+++ b/man/dataRetrieval-package.Rd
@@ -8,8 +8,8 @@
 \tabular{ll}{
 Package: \tab dataRetrieval\cr
 Type: \tab Package\cr
-Version: \tab 2.0.2\cr
-Date: \tab 2014-12-15\cr
+Version: \tab 2.1.1\cr
+Date: \tab 2015-01-29\cr
 License: \tab Unlimited for this package, dependencies have more restrictive licensing.\cr
 Copyright: \tab This software is in the public domain because it contains materials
 that originally came from the United States Geological Survey, an agency of
diff --git a/man/getWebServiceData.Rd b/man/getWebServiceData.Rd
index a35ccd90..1396433f 100644
--- a/man/getWebServiceData.Rd
+++ b/man/getWebServiceData.Rd
@@ -23,6 +23,8 @@ endDate <- "2012-10-01"
 offering <- '00003'
 property <- '00060'
 obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
+\dontrun{
 rawData <- getWebServiceData(obs_url)
 }
+}
 
diff --git a/man/importRDB1.Rd b/man/importRDB1.Rd
index 1bf25ea2..3c2764e8 100644
--- a/man/importRDB1.Rd
+++ b/man/importRDB1.Rd
@@ -62,8 +62,9 @@ property <- "00060"
 
 obs_url <- constructNWISURL(siteNumber,property,
          startDate,endDate,"dv",format="tsv")
-data <- importRDB1(obs_url)
 \dontrun{
+data <- importRDB1(obs_url)
+
 urlMultiPcodes <- constructNWISURL("04085427",c("00060","00010"),
          startDate,endDate,"dv",statCd=c("00003","00001"),"tsv")
 multiData <- importRDB1(urlMultiPcodes)
diff --git a/man/importWaterML2.Rd b/man/importWaterML2.Rd
index 44d4c1e5..419775eb 100644
--- a/man/importWaterML2.Rd
+++ b/man/importWaterML2.Rd
@@ -44,16 +44,10 @@ URLmulti <-  paste(baseURL,
   "statCd=00003",
   "parameterCd=00060",sep="&")
 dataReturnMulti <- importWaterML2(URLmulti)
-
-filePath <- system.file("extdata", package="dataRetrieval")
-fileName <- "WaterML2Example.xml"
-fullPath <- file.path(filePath, fileName)
-UserData <- importWaterML2(fullPath)
 }
 filePath <- system.file("extdata", package="dataRetrieval")
 fileName <- "WaterML2Example.xml"
 fullPath <- file.path(filePath, fileName)
-
-fileData <- importWaterML2(fullPath)
+UserData <- importWaterML2(fullPath)
 }
 
diff --git a/man/readNWISuv.Rd b/man/readNWISuv.Rd
index 53557a82..c2c62015 100644
--- a/man/readNWISuv.Rd
+++ b/man/readNWISuv.Rd
@@ -61,9 +61,9 @@ siteNumber <- '05114000'
 parameterCd <- '00060'
 startDate <- "2014-10-10"
 endDate <- "2014-10-10"
-# These examples require an internet connection to run
-rawData <- readNWISuv(siteNumber,parameterCd,startDate,endDate)
 \dontrun{
+rawData <- readNWISuv(siteNumber,parameterCd,startDate,endDate)
+
 timeZoneChange <- readNWISuv(c('04024430','04024000'),parameterCd,
          "2013-11-03","2013-11-03")
 }
diff --git a/man/renameNWISColumns.Rd b/man/renameNWISColumns.Rd
index c403d32f..28cdad59 100644
--- a/man/renameNWISColumns.Rd
+++ b/man/renameNWISColumns.Rd
@@ -65,10 +65,12 @@ The following statistics codes are converted by \code{renameNWISColumns}. See
 siteWithTwo <- '01480015'
 startDate <- "2012-09-01"
 endDate <- "2012-10-01"
+\dontrun{
 url2 <- constructNWISURL(siteWithTwo, "00060",startDate,endDate,'dv')
 twoResults <- importWaterML1(url2,TRUE)
 twoResults <- renameNWISColumns(twoResults)
 }
+}
 \seealso{
 \code{\link{readNWISdv}}, \code{\link{readNWISuv}}
 }
diff --git a/man/whatNWISsites.Rd b/man/whatNWISsites.Rd
index 40d0ad27..330236fc 100644
--- a/man/whatNWISsites.Rd
+++ b/man/whatNWISsites.Rd
@@ -35,8 +35,10 @@ Arguments to the function should be based on \url{http://waterservices.usgs.gov/
 Mapper format is used
 }
 \examples{
+\dontrun{
 siteListPhos <- whatNWISsites(stateCd="OH",parameterCd="00665")
 }
+}
 \keyword{NWIS}
 \keyword{data}
 \keyword{import}
-- 
GitLab