From cc5e8781bd6b84ec1ea3b1a028f82952d0a55316 Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Wed, 18 Feb 2015 13:01:50 -0600
Subject: [PATCH] Fix broken warning check.

---
 R/readNWISqw.r | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/R/readNWISqw.r b/R/readNWISqw.r
index 434e4370..540658d6 100644
--- a/R/readNWISqw.r
+++ b/R/readNWISqw.r
@@ -142,7 +142,7 @@ readNWISqw <- function (siteNumbers,parameterCd,startDate="",endDate="",
                          "hyd_event_cd","sample_lab_cm_tx")
       columnsToMelt <- columnsToMelt[columnsToMelt %in% names(data)]
       dataWithPcodes <- data[data$parm_cd != "",]
-      if(sum(data$parm_cd != "") > 0){
+      if(sum(data$parm_cd == "") > 0){
         warning("Some or all data returned without pCodes, those data will not be included in reshape")
       }
       longDF <- melt(dataWithPcodes, columnsToMelt)
-- 
GitLab