[Stacomir-commits] r433 - in pkg/stacomir: . R inst/tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 26 10:33:58 CEST 2017


Author: briand
Date: 2017-06-26 10:33:58 +0200 (Mon, 26 Jun 2017)
New Revision: 433

Modified:
   pkg/stacomir/DESCRIPTION
   pkg/stacomir/R/report_mig_interannual.R
   pkg/stacomir/inst/tests/testthat/test-06-report_mig_interannual.R
Log:


Modified: pkg/stacomir/DESCRIPTION
===================================================================
--- pkg/stacomir/DESCRIPTION	2017-06-26 07:50:19 UTC (rev 432)
+++ pkg/stacomir/DESCRIPTION	2017-06-26 08:33:58 UTC (rev 433)
@@ -9,7 +9,7 @@
     monitoring. It is a part of the 'STACOMI' open source project developed in
     France by the French Agency for Biodiversity (AFB) institute to centralize
     data obtained by fish pass monitoring. Version 0.5.3 is available in French and
-    English. 
+    English. See <http://stacomir.r-forge.r-project.org/> for more information on 'STACOMI'.
 License: GPL (>= 2)
 URL: <http://stacomir.r-forge.r-project.org/>
 Collate:

Modified: pkg/stacomir/R/report_mig_interannual.R
===================================================================
--- pkg/stacomir/R/report_mig_interannual.R	2017-06-26 07:50:19 UTC (rev 432)
+++ pkg/stacomir/R/report_mig_interannual.R	2017-06-26 08:33:58 UTC (rev 433)
@@ -651,7 +651,7 @@
 		  } else {
 			the_choice <- max(as.numeric(as.character(dat$annee)))
 		  }
-		  amplitud <- paste(min(as.numeric(as.character(dat$annee))),
+		  amplitude <- paste(min(as.numeric(as.character(dat$annee))),
               "-",max(as.numeric(as.character(dat$annee))),sep="")      
 		  #################
 		  # calculation of cumusums

Modified: pkg/stacomir/inst/tests/testthat/test-06-report_mig_interannual.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-06-report_mig_interannual.R	2017-06-26 07:50:19 UTC (rev 432)
+++ pkg/stacomir/inst/tests/testthat/test-06-report_mig_interannual.R	2017-06-26 08:33:58 UTC (rev 433)
@@ -183,3 +183,30 @@
 	  )		
       rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
+    
+    test_that("Test bmi step plot",{
+	            require(stacomiR)
+	            stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	            # overriding user schema to point to iav
+	            baseODBC<-get("baseODBC",envir=envir_stacomi)
+	            baseODBC[c(2,3)]<-rep("iav",2)
+	            assign("baseODBC",baseODBC,envir_stacomi)
+	            sch<-get("sch",envir=envir_stacomi) # "iav."
+	            assign("sch","iav.",envir_stacomi)
+	            r_mig_interannual<-new("report_mig_interannual")
+	            # the following will load data for size, 
+	            # parameters 1786 (total size) C001 (size at video control)
+	            # dc 5 and 6 are fishways located on the Arzal dam
+	            # two stages are selected
+	            r_mig_interannual<-choice_c(r_mig_interannual,
+		                dc=6,
+		                taxa=c("Anguilla anguilla"),
+		                stage=c("AGJ"),
+		                anneedebut=1996,
+		                anneefin=2015,
+		                silent=TRUE)
+	            r_mig_interannual<-connect(r_mig_interannual,silent=TRUE)	
+	            plot(r_mig_interannual,plot.type="step",silent=TRUE)
+                rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
+	        })
+              



More information about the Stacomir-commits mailing list