[Stacomir-commits] r317 - pkg/stacomir/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 18 21:35:24 CET 2017


Author: briand
Date: 2017-03-18 21:35:24 +0100 (Sat, 18 Mar 2017)
New Revision: 317

Modified:
   pkg/stacomir/R/RefStationMesure.r
Log:
Changing case for consistency with other classes

Modified: pkg/stacomir/R/RefStationMesure.r
===================================================================
--- pkg/stacomir/R/RefStationMesure.r	2017-03-18 20:34:50 UTC (rev 316)
+++ pkg/stacomir/R/RefStationMesure.r	2017-03-18 20:35:24 UTC (rev 317)
@@ -89,20 +89,20 @@
 #' @param object an object of class RefStationMesure
 #' @param stationmesure a character vector of the monitoring station code (corresponds to stm_libelle in the tj_stationmesure_stm table)
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
-setMethod("choice_c",signature=signature("RefStationMesure"),definition=function(object,stationmesure) {
-			if (class(stationmesure)!="character") {		
+setMethod("choice_c",signature=signature("RefStationMesure"),definition=function(object,stationMesure) {
+			if (class(stationMesure)!="character") {		
 				stop("the stationmesure should be of class character")
 			} 
 			if(length(stationMesure)==0){
 				stop("Select at least one value\n")
 			}
-			if (any(is.na(stationmesure))){
+			if (any(is.na(stationMesure))){
 				stop("NA values for stationmesure")
 			} 
 			# I can use the stm_libelle as there is a unique constraint in the table
-			libellemanquants<-stationmesure[!stationmesure%in%object at data$stm_libelle]
+			libellemanquants<-stationMesure[!stationMesure%in%object at data$stm_libelle]
 			if (length(libellemanquants)>0) warning(gettextf("stationmesure code not present :\n %s",stringr::str_c(libellemanquants,collapse=", "),domain="R-stacomiR"))
-			object at data<-object at data[object at data$stm_libelle%in%stationmesure,]		
+			object at data<-object at data[object at data$stm_libelle%in%stationMesure,]		
 			assign("refStationMesure",object,envir_stacomi)
 			return(object)
 		})
\ No newline at end of file



More information about the Stacomir-commits mailing list