From 2cbc8a21be9c6b06d57bb33b9a70120f1b1f8000 Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Wed, 31 Dec 2014 12:03:59 -0600
Subject: [PATCH] Fixed date conversion bug.

---
 R/readWQPdata.R  | 9 ++++-----
 R/whatWQPsites.R | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/R/readWQPdata.R b/R/readWQPdata.R
index cf5e7b81..3aa5fbac 100644
--- a/R/readWQPdata.R
+++ b/R/readWQPdata.R
@@ -89,12 +89,11 @@
 #' \dontrun{
 #' nameToUse <- "pH"
 #' pHData <- readWQPdata(siteid="USGS-04024315",characteristicName=nameToUse)
-#' pHDataExpanded <- readWQPdata(bBox="-90.10,42.67,-88.64,43.35",characteristicName=nameToUse)
 #' pHDataExpanded2 <- readWQPdata(bBox=c(-90.10,42.67,-88.64,43.35),characteristicName=nameToUse)
-#' startDate <- as.Date("2008-01-01")
+#' startDate <- as.Date("2013-01-01")
 #' nutrientPysical <- readWQPdata(statecode="US:55",siteType="Stream",
-#'                         samplMedia="Water",startDateLo=startDate,
-#'                         characteristicType=c("Nutrient","Physical))
+#'                         sampleMedia="Water",startDate=startDate,
+#'                         characteristicType=c("Nutrient","Physical"))
 #' }
 readWQPdata <- function(...){
   
@@ -123,7 +122,7 @@ readWQPdata <- function(...){
       warning("Please check the date format for the arguments: ", paste(names(values)[index], collapse=", "))
     }
     
-    names(values)[names(values) == 'beginDate'] <- 'startDateLo'
+    names(values)[names(values) == 'startDate'] <- 'startDateLo'
     names(values)[names(values) == 'endDate'] <- 'startDateHi'
     
   }
diff --git a/R/whatWQPsites.R b/R/whatWQPsites.R
index f7f3db74..c9b15dbd 100644
--- a/R/whatWQPsites.R
+++ b/R/whatWQPsites.R
@@ -82,7 +82,7 @@ whatWQPsites <- function(...){
       warning("Please check the date format for the arguments: ", paste(names(values)[index], collapse=", "))
     }
     
-    names(values)[names(values) == 'beginDate'] <- 'startDateLo'
+    names(values)[names(values) == 'startDate'] <- 'startDateLo'
     names(values)[names(values) == 'endDate'] <- 'startDateHi'
     
   }
-- 
GitLab