From 2c9745a99c3903e6c417e82448edf18d052916ed Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Thu, 13 Nov 2014 09:31:38 -0600
Subject: [PATCH] Took out examples to pass the time requirements for package
 checks on CRAN.

---
 R/constructNWISURL.r | 6 ++++--
 R/importRDB1.r       | 2 ++
 R/importWaterML1.r   | 2 ++
 R/readNWISdata.r     | 3 +++
 R/readNWISqw.r       | 2 ++
 5 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/R/constructNWISURL.r b/R/constructNWISURL.r
index 3658b869..99fdde9a 100644
--- a/R/constructNWISURL.r
+++ b/R/constructNWISURL.r
@@ -25,10 +25,10 @@
 #' startDate <- '1985-01-01'
 #' endDate <- ''
 #' pCode <- c("00060","00010")
-#' url_daily <- constructNWISURL(siteNumber,pCode,
-#'            startDate,endDate,'dv',statCd=c("00003","00001"))
 #' \dontrun{
 #' # Not running for time considerations
+#' url_daily <- constructNWISURL(siteNumber,pCode,
+#'            startDate,endDate,'dv',statCd=c("00003","00001"))
 #' url_unit <- constructNWISURL(siteNumber,pCode,"2012-06-28","2012-06-30",'iv')
 #' 
 #' url_qw_single <- constructNWISURL(siteNumber,"01075",startDate,endDate,'qw')
@@ -46,6 +46,8 @@ constructNWISURL <- function(siteNumber,parameterCd="00060",startDate="",endDate
 
   service <- match.arg(service, c("dv","uv","iv","qw","gwlevels","rating","peak","meas"))
   
+  parameterCdFile <- parameterCdFile
+  
   if(any(!is.na(parameterCd))){
     pcodeCheck <- all(nchar(parameterCd) == 5) & all(!is.na(suppressWarnings(as.numeric(parameterCd))))
     
diff --git a/R/importRDB1.r b/R/importRDB1.r
index 5ce9cd25..ce262722 100644
--- a/R/importRDB1.r
+++ b/R/importRDB1.r
@@ -23,6 +23,7 @@
 #' endDate <- "2012-10-01"
 #' offering <- "00003"
 #' property <- "00060"
+#' \dontrun{
 #' obs_url <- constructNWISURL(siteNumber,property,
 #'          startDate,endDate,"dv",format="tsv")
 #' data <- importRDB1(obs_url)
@@ -46,6 +47,7 @@
 #' fileName <- "RDB1Example.txt"
 #' fullPath <- file.path(filePath, fileName)
 #' importUserRDB <- importRDB1(fullPath)
+#' }
 importRDB1 <- function(obs_url, asDateTime=FALSE, qw=FALSE, convertType = TRUE, tz=""){
   
   if(tz != ""){
diff --git a/R/importWaterML1.r b/R/importWaterML1.r
index 4e138253..972750d3 100644
--- a/R/importWaterML1.r
+++ b/R/importWaterML1.r
@@ -21,6 +21,7 @@
 #' offering <- '00003'
 #' property <- '00060'
 #' obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
+#' \dontrun{
 #' data <- importWaterML1(obs_url,TRUE)
 #' 
 #' groundWaterSite <- "431049071324301"
@@ -48,6 +49,7 @@
 #' names(attributes(data))
 #' attr(data, "url")
 #' attr(data, "disclaimer")
+#' }
 importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
   
   if(url.exists(obs_url)){
diff --git a/R/readNWISdata.r b/R/readNWISdata.r
index 0a7e96a0..62587f4f 100644
--- a/R/readNWISdata.r
+++ b/R/readNWISdata.r
@@ -10,12 +10,15 @@
 #' @return retval dataframe 
 #' @export
 #' @examples
+#' \dontrun{
+#' # Examples not run for time considerations
 #' dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010")
 #' dataTempUnit <- readNWISdata(sites="03086500", service="iv", parameterCd="00010")
 #' #Empty:
 #' multiSite <- readNWISdata(sites=c("04025000","04072150"), service="iv", parameterCd="00010")
 #' #Not empty:
 #' multiSite <- readNWISdata(sites=c("04025500","040263491"), service="iv", parameterCd="00060")
+#' }
 readNWISdata <- function(service="dv", ...){
   
   matchReturn <- list(...)
diff --git a/R/readNWISqw.r b/R/readNWISqw.r
index f35a567a..8aab1216 100644
--- a/R/readNWISqw.r
+++ b/R/readNWISqw.r
@@ -27,11 +27,13 @@
 #' startDate <- '2010-01-01'
 #' endDate <- ''
 #' pCodes <- c('34247','30234','32104','34220')
+#' \dontrun{
 #' rawNWISqwData <- readNWISqw(siteNumber,pCodes,startDate,endDate)
 #' rawNWISqwDataExpandReshaped <- readNWISqw(siteNumber,pCodes,
 #'           startDate,endDate,expanded=TRUE)
 #' rawNWISqwDataExpand <- readNWISqw(siteNumber,pCodes,
 #'           startDate,endDate,expanded=TRUE,reshape=FALSE)
+#'           }
 readNWISqw <- function (siteNumber,pCodes,startDate="",endDate="",
                         expanded=FALSE,reshape=TRUE,tz=""){  
   
-- 
GitLab