From 82a1c48a9206377f3b496a35c51bac061984d2b0 Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Fri, 10 Oct 2014 09:09:04 -0500
Subject: [PATCH] Chagned call to global variables.

---
 R/populateParameterINFO.r | 42 +++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/R/populateParameterINFO.r b/R/populateParameterINFO.r
index f1a5e802..c21ecc6c 100644
--- a/R/populateParameterINFO.r
+++ b/R/populateParameterINFO.r
@@ -2,10 +2,10 @@
 #'
 #' Populates INFO data frame with additional user-supplied information concerning the measured parameter.
 #'
-#' @param localINFO dataframe with value and code columns. Default is INFO
+#' @param INFO dataframe with value and code columns. Default is INFO
 #' @param parameterCd string USGS parameter code
 #' @param interactive logical Option for interactive mode.  If true, there is user interaction for error handling and data checks.
-#' @return localINFO dataframe
+#' @return INFO dataframe
 #' @export
 #' @examples
 #' #This example requires an internet connection to run
@@ -16,40 +16,40 @@
 #' INFO$param.units <- parameterData$parameter_units
 #' INFO$paramShortName <- parameterData$srsname
 #' INFO$paramNumber <- parameterData$parameter_cd
-#' INFO <- populateParameterINFO(parameterCd)
-populateParameterINFO <- function(parameterCd, localINFO=INFO, interactive=TRUE){
+#' INFO <- populateParameterINFO(parameterCd, INFO)
+populateParameterINFO <- function(parameterCd, INFO, interactive=TRUE){
   if (nzchar(parameterCd)){
     if(interactive){
-      cat("Your water quality data are for parameter number", localINFO$paramNumber, "which has the name:'", localINFO$param.nm, "'.\n")
-      cat("Typically you will want a shorter name to be used in graphs and tables. The suggested short name is:'", localINFO$paramShortName, "'.\n")
+      cat("Your water quality data are for parameter number", INFO$paramNumber, "which has the name:'", INFO$param.nm, "'.\n")
+      cat("Typically you will want a shorter name to be used in graphs and tables. The suggested short name is:'", INFO$paramShortName, "'.\n")
       cat("If you would like to change the short name, enter it here, otherwise just hit enter (no quotes):")
       shortNameTemp <- readline()
-      if (nchar(shortNameTemp)>0) localINFO$paramShortName <- shortNameTemp
-      cat("The units for the water quality data are: ", localINFO$param.units, ".\n")
+      if (nchar(shortNameTemp)>0) INFO$paramShortName <- shortNameTemp
+      cat("The units for the water quality data are: ", INFO$param.units, ".\n")
       cat("It is helpful to set up a constiuent abbreviation when doing multi-constituent studies, enter a unique id (three or four characters should work something like tn or tp or NO3).\nIt is case sensitive.  Even if you don't feel you need an abbreviation you need to enter something (no quotes):\n")
-      localINFO$constitAbbrev <- readline()
+      INFO$constitAbbrev <- readline()
     } else {
-      localINFO$constitAbbrev <- localINFO$paramShortName
+      INFO$constitAbbrev <- INFO$paramShortName
     }
   } else {
     if (interactive){
-      localINFO$paramNumber <- NA
+      INFO$paramNumber <- NA
       cat("Enter a long name for the water quality data (no quotes):\n")
-      localINFO$param.nm <- readline()
+      INFO$param.nm <- readline()
       cat("Enter a short name to be used in graphs and tables(no quotes):\n")
-      localINFO$paramShortName <- readline()
+      INFO$paramShortName <- readline()
       cat("It is helpful to set up a constiuent abbreviation when doing multi-constituent studies, enter a unique id (three or four characters should work something like tn or tp or NO3).\nIt is case sensitive.  Even if you don't feel you need an abbreviation you need to enter something (no quotes):\n")
-      localINFO$constitAbbrev <- readline()
+      INFO$constitAbbrev <- readline()
       cat("Enter the units of the water quality data(no quotes):\n")
-      localINFO$param.units <- readline()
+      INFO$param.units <- readline()
     } else {
-      localINFO$paramNumber <- NA
-      localINFO$param.nm <- NA
-      localINFO$paramShortName <- NA
-      localINFO$constitAbbrev <- NA
-      localINFO$param.units <- NA      
+      INFO$paramNumber <- NA
+      INFO$param.nm <- NA
+      INFO$paramShortName <- NA
+      INFO$constitAbbrev <- NA
+      INFO$param.units <- NA      
     }
   } 
   
-  return(localINFO)
+  return(INFO)
 }
-- 
GitLab