[Stacomir-commits] r418 - in pkg: stacomir stacomir/R stacomir/inst/config stacomir/inst/tests/testthat stacomir/man stacomirtools/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 24 22:08:23 CEST 2017


Author: briand
Date: 2017-06-24 22:08:23 +0200 (Sat, 24 Jun 2017)
New Revision: 418

Modified:
   pkg/stacomir/DESCRIPTION
   pkg/stacomir/NAMESPACE
   pkg/stacomir/R/stacomi.R
   pkg/stacomir/inst/config/generate_Roxygen2.R
   pkg/stacomir/inst/tests/testthat/test-00-stacomir.R
   pkg/stacomir/inst/tests/testthat/test-00-zrefclasses.R
   pkg/stacomir/inst/tests/testthat/test-01-report_mig_mult.R
   pkg/stacomir/inst/tests/testthat/test-02-report_mig.R
   pkg/stacomir/inst/tests/testthat/test-05-report_sample_char.R
   pkg/stacomir/inst/tests/testthat/test-06-report_mig_interannual.R
   pkg/stacomir/inst/tests/testthat/test-07-report_sea_age.R
   pkg/stacomir/inst/tests/testthat/test-08-report_silver_eel.R
   pkg/stacomir/inst/tests/testthat/test-09-report_annual.R
   pkg/stacomir/inst/tests/testthat/test-10-report_env.R
   pkg/stacomir/inst/tests/testthat/test-11-report_mig_env.R
   pkg/stacomir/inst/tests/testthat/test-12-report_mig_char.R
   pkg/stacomir/inst/tests/testthat/test-13-report_species.R
   pkg/stacomir/man/stacomiR-package.Rd
   pkg/stacomirtools/R/ConnectionODBC.r
   pkg/stacomirtools/R/RequeteODBC.r
Log:
Removing assignment to .GlobalEnv and commenting strings so as to pass
check on DESCRIPTION

Modified: pkg/stacomir/DESCRIPTION
===================================================================
--- pkg/stacomir/DESCRIPTION	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/DESCRIPTION	2017-06-24 20:08:23 UTC (rev 418)
@@ -1,14 +1,14 @@
 Package: stacomiR
 Version: 0.5.3
-Date: 2017-06-19
-Title: Fish Migration Monitoring (stacomiR)
+Date: 2017-06-24
+Title: Fish Migration Monitoring ('stacomiR')
 Authors at R: c(person("Cedric", "Briand", role = c("aut", "cre"), email = "cedric.briand00 at gmail.com"),
 	      person("Marion", "Legrand", role = "aut", email="tableau-salt-loire at logrami.fr"),
 	      person("Timothee", "Besse", role = "aut", email="tableau-ang-loire at logrami.fr"))
-Description: Graphical outputs and treatment for a database of fishway
-    monitoring. It is a part of the STACOMI open source project developed in
+Description: Graphical outputs and treatment for a database of fish pass
+    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 fishway monitoring. Version 0.5.3 is available in French and
+    data obtained by fish pass monitoring. Version 0.5.3 is available in French and
     English.
 License: GPL (>= 2)
 Collate:

Modified: pkg/stacomir/NAMESPACE
===================================================================
--- pkg/stacomir/NAMESPACE	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/NAMESPACE	2017-06-24 20:08:23 UTC (rev 418)
@@ -16,6 +16,7 @@
 export(split_per_day)
 export(stacomi)
 export(vector_to_listsql)
+export(envir_stacomi)
 exportClasses(report_annual)
 exportClasses(report_dc)
 exportClasses(report_df)

Modified: pkg/stacomir/R/stacomi.R
===================================================================
--- pkg/stacomir/R/stacomi.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/R/stacomi.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -358,8 +358,7 @@
 stacomi=function(gr_interface=TRUE,login_window=TRUE,database_expected=TRUE){
   # first loading of connection and odbc info using chargexml()
   # trois variables passees a interface graphique via envir_stacomi :
-  envir_stacomi <- new.env(parent = emptyenv())
-  assign("envir_stacomi",envir_stacomi,.GlobalEnv)
+  #envir_stacomi <- new.env(parent = asNamespace("stacomiR"))
   assign("gr_interface",gr_interface,envir=envir_stacomi)	
   assign("database_expected",database_expected,envir=envir_stacomi)
   assign("login_window",login_window,envir=envir_stacomi)
@@ -537,9 +536,9 @@
 #				"frame_std","frame_tax","frame_annee","frame_check","frame_choice","ref_year",
 #				"logw","report_stage_pigm","usrname","usrpwd","notebook","values","ind","progress_bar","progres"))
 # Progressbar
-utils::globalVariables(c("progres"))
+#utils::globalVariables(c("progres"))
 # environment
-utils::globalVariables(c("envir_stacomi"))
+#utils::globalVariables(c("envir_stacomi"))
 # reoxygenize fails if data are not loaded
 #setwd("F:/workspace/stacomir/branch0.5/stacomir")
 
@@ -559,5 +558,5 @@
 #						"uid", "pwd", "sqldf.uid", "sqldf.pwd", "sqldf.dbname", "sqldf.host", 
 #						"sqldf.port", "pgwd", "datawd", "lang"), class = "data.frame", row.names = c(NA, 
 #						-1L))
-#envir_stacomi <- new.env(parent = emptyenv())
+envir_stacomi <- new.env(parent = asNamespace("stacomiR"))
 #calcmig<-data.frame()
\ No newline at end of file

Modified: pkg/stacomir/inst/config/generate_Roxygen2.R
===================================================================
--- pkg/stacomir/inst/config/generate_Roxygen2.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/config/generate_Roxygen2.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -40,8 +40,11 @@
 roxygen2::roxygenise("C:/workspace/stacomir/pkg/stacomir");warnings()[1:10]
 
 #Pour Marion 
+
+# using roxygen with stacomirtools
 #roxygen2::roxygenise("C:/Users/logrami/workspace/stacomir/pkg/stacomir");warnings()[1:10]
+require(Rd2roxygen)
+setwd("C:/workspace/stacomir/pkg")
+Rd2roxygen(pkg="stacomirtools")
 
-
-
     
\ No newline at end of file

Modified: pkg/stacomir/inst/tests/testthat/test-00-stacomir.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-00-stacomir.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-00-stacomir.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -37,7 +37,7 @@
 
 test_that("Test that stacomirtools connects",{
 	  require(stacomiR)
-	  envir_stacomi <<- new.env(parent = emptyenv())
+      envir_stacomi <- new.env(parent = asNamespace("stacomiR"))
 	  mylinks=chargecsv(database_expected=TRUE)
 	  baseODBC=mylinks[["baseODBC"]]	
 	  con=new("ConnectionODBC")	
@@ -46,7 +46,7 @@
 	  expect_is(connect(con),'ConnectionODBC')
 	  expect_equal(con at etat,"Connection in progress")
 	  odbcCloseAll()
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm("envir_stacomi")
 	})
 
 
@@ -65,13 +65,13 @@
 #			expect_is(connect(con),'ConnectionODBC')
 #			expect_equal(con at etat,"Connection in progress")
 #			odbcCloseAll()			
-#			rm("envir_stacomi",envir =.GlobalEnv)
+#			rm("envir_stacomi")
 #		})
 
 
 test_that("Test that positive count for nrow(ref.tr_taxon_tax)",{
 	  require(stacomiR)
-	  envir_stacomi <<- new.env(parent = emptyenv())
+      envir_stacomi <- new.env(parent = asNamespace("stacomiR"))
 	  mylinks=chargecsv(database_expected=TRUE)
 	  baseODBC=mylinks[["baseODBC"]]	
 	  requete=new("RequeteODBC")
@@ -80,12 +80,12 @@
 	  requete<-stacomirtools::connect(requete)
 	  expect_true(as.numeric(requete at query)>0)	
 	  odbcCloseAll()
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm("envir_stacomi")
 	})
 
 test_that("Tests positive count for sch.t_operation_ope",{
 	  require(stacomiR)
-	  envir_stacomi <<- new.env(parent = emptyenv())
+      envir_stacomi <- new.env(parent = asNamespace("stacomiR"))
 	  mylinks=chargecsv(database_expected=TRUE)
 	  baseODBC=mylinks[["baseODBC"]]	
 	  sch<-paste(baseODBC[2],".",sep="")
@@ -95,7 +95,7 @@
 	  requete<-stacomirtools::connect(requete)
 	  expect_true(as.numeric(requete at query)>0)	
 	  odbcCloseAll()
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm("envir_stacomi")
 	})
 
 context("Loading program")
@@ -106,7 +106,6 @@
 	  stacomi(gr_interface=TRUE,login_window=TRUE,database_expected=TRUE)
 	  expect_true(exists("envir_stacomi"))
 	  dispose(get("logw",envir_stacomi))
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("Test that gWidget loginwindow is loaded ",{
@@ -114,7 +113,6 @@
 	  stacomi(gr_interface=TRUE,login_window=TRUE,database_expected=TRUE)
 	  expect_true(exists("logw",envir_stacomi))
 	  dispose(get("logw",envir_stacomi))
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("Test that gWidget gr_interface is loaded, without database_expected, nor login window",{
@@ -122,7 +120,6 @@
 	  stacomi(gr_interface=TRUE,login_window=FALSE,database_expected=FALSE)
 	  expect_true(exists("win",envir_stacomi))			
 	  dispose(get("win",envir_stacomi))
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("gWidget gr_interface is loaded, with pre launch_test, but without login window",{
@@ -130,7 +127,6 @@
 	  stacomi(gr_interface=TRUE,login_window=FALSE,database_expected=TRUE)
 	  expect_true(exists("win",envir_stacomi))
 	  dispose(get("win",envir_stacomi))
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-00-zrefclasses.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-00-zrefclasses.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-00-zrefclasses.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -17,7 +17,6 @@
 			  horodate="01-01-2013"),prints_text("^\\[1\\].+date.+"))				
 	  expect_error(ref_horodate<-choice_c(ref_horodate,	
 			  horodate="2013/01/01 00:00:00"))
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-01-report_mig_mult.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-01-report_mig_mult.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-01-report_mig_mult.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -68,7 +68,7 @@
 		  silent=TRUE)
 	  options(warn = 0)
 	  report_mig_mult<-charge(report_mig_mult,silent=TRUE)
-	  
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 test_that("Test connect method for report_mig_mult",
@@ -107,6 +107,7 @@
 	  source(example_path)
 	  options(warn = 0)
 	  summary(r_mig_mult,silent=TRUE)
+      rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-02-report_mig.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-02-report_mig.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-02-report_mig.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -19,7 +19,7 @@
 	  options(warn = 0)
 	  expect_s4_class(report_mig,
 		  "report_mig")
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	   rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 
@@ -50,7 +50,7 @@
 	  # the rest are in 1998
 	  expect_equal(round(sum(report_mig at calcdata[["dc_6"]][["data"]]$Effectif_total)),
 		  8614)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 test_that("Test another instance of report_mig, check that operations accross two years are split correcly",{
@@ -80,7 +80,7 @@
 	  # the rest are in 1998
 	  expect_equal(round(sum(report_mig at calcdata[["dc_6"]][["data"]]$Effectif_total)),
 		  26454)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	   rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 test_that("Test connect method",{
@@ -105,7 +105,7 @@
 	  r_mig<-connect(r_mig,silent=TRUE)
 	  
 	  expect_length(r_mig at data,11)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	   rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 test_that("Test example 02_report_mig",
@@ -135,7 +135,7 @@
 	  data("r_mig")
 	  r_mig<-calcule(r_mig,silent=TRUE)
 	  summary(r_mig,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 test_that("Test writing an example to the database",
@@ -153,7 +153,7 @@
 	  data("r_mig")
 	  r_mig<-calcule(r_mig,silent=TRUE)
 	  write_database(object=r_mig,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 test_that("Test that different sums are the same, for report_mig, report_mig_interannual, report_annual",
@@ -193,7 +193,7 @@
 		  sum(bili at data$bjo_valeur[bili at data$bjo_labelquantite=="Effectif_total"]),			
 		  label="The sum of number in the report_mig are different to the
 			  number in the report_mig_interannual")
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 
@@ -211,7 +211,7 @@
 	  # this chunk is not launched from examples but loads the r_mig dataset if connection works	
 	  data("r_mig")
 	  expect_output(print(r_mig), "report_mig=choice_c",info = NULL)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 
@@ -240,7 +240,7 @@
 	  bM_EclusierVaux<-calcule(bM_EclusierVaux,silent=TRUE)
 	  plot(bM_EclusierVaux,silent=TRUE)
 	  summary(bM_EclusierVaux,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 
@@ -270,7 +270,7 @@
 	  # some additional arguments passed to plot via ...
 	  plot(bM_Arzal_civ,silent=TRUE,bty="n")
 	  summary(bM_Arzal_civ,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
+	  rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 # here require setting a connection to logrami server under the name BD_CONTMIG_NAT_SERVEUR
 #test_that("test connexion to logrami server",

Modified: pkg/stacomir/inst/tests/testthat/test-05-report_sample_char.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-05-report_sample_char.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-05-report_sample_char.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -36,7 +36,6 @@
 	  #options(warn = 0)
 	  expect_s4_class(r_sample_char,
 		  "report_sample_char")
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 
@@ -65,7 +64,6 @@
 	  r_sample_char<-connect(r_sample_char,silent=TRUE)
 	  expect_true(nrow(r_sample_char at data)>0,label="No data for r_sample_char")
 	  r_sample_char<-calcule(r_sample_char,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	  
 	})
 
@@ -94,7 +92,6 @@
 	  r_sample_char<-connect(r_sample_char,silent=TRUE)
 	  r_sample_char<-charge(r_sample_char)
 	  r_sample_char<-calcule(r_sample_char,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	  
 	})
 

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-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-06-report_mig_interannual.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -26,7 +26,6 @@
 	  # three warning produced, none shown due to silent=TRUE
 	  options(warn = 0)
 	  expect_s4_class(r_mig_interannual,"report_mig_interannual")
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 
@@ -54,7 +53,6 @@
 	  r_mig_interannual<-connect(r_mig_interannual,silent=TRUE)	
 	  summary(object=r_mig_interannual,silent=TRUE)
 	  # two warning produced
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	  
 	})
 
@@ -180,5 +178,4 @@
 		  label="The sum of number in the report_mig are different to the
 			  number in the report_annual class"
 	  )		
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})

Modified: pkg/stacomir/inst/tests/testthat/test-07-report_sea_age.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-07-report_sea_age.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-07-report_sea_age.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -21,7 +21,6 @@
 		  ))
 	  # warnings No data for par 1786No data for par 1785
 	  r_seaa<-connect(r_seaa,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("test that loading bad limits fails",{

Modified: pkg/stacomir/inst/tests/testthat/test-08-report_silver_eel.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-08-report_silver_eel.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-08-report_silver_eel.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -26,7 +26,6 @@
       plot(r_silver, plot.type=4)
 # print a summary statistic, and save the output in a list for later use
       stats<-summary(r_silver,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-09-report_annual.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-09-report_annual.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-09-report_annual.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -20,7 +20,6 @@
 		  silent=TRUE)
 	  r_ann<-connect(r_ann,silent=TRUE)	
 	  expect_s4_class(r_ann,"report_annual")
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 
@@ -45,8 +44,7 @@
 	  dev.new()
 	  plot(r_ann,silent=TRUE)
 	  dev.new()
-	  barplot(r_ann)
-	  rm("envir_stacomi",envir =.GlobalEnv)			
+	  barplot(r_ann)			
 	})
 
 test_that("Test example report_mig_annual-example",

Modified: pkg/stacomir/inst/tests/testthat/test-10-report_env.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-10-report_env.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-10-report_env.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -12,7 +12,6 @@
 		  silent=TRUE)	
 	  r_env<-connect(r_env,silent=TRUE)
 	  expect_true(nrow(r_env at data)>0,"The is a problem when loading data in the data slot" )
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("test plot method",{
@@ -26,7 +25,6 @@
 		  silent=TRUE)	
 	  r_env<-connect(r_env,silent=TRUE)
 	  r_env<-plot(r_env)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-11-report_mig_env.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-11-report_mig_env.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-11-report_mig_env.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -17,7 +17,6 @@
 	  r_mig_env<-connect(r_mig_env,silent=TRUE)
 	  expect_true(nrow(r_mig_env at report_env@data)>0,"Data not loaded in the report_env part of the object" )
 	  expect_true(nrow(r_mig_env at report_mig_mult@data)>0,"Data not loaded in the report_mig_mult part of the object" )
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("test plot method",{
@@ -39,7 +38,6 @@
 	  suppressWarnings(plot(r_mig_env,
 			  color_station=c("temp_gabion"="red","coef_maree"="blue","phases_lune"="pink"),
 			  color_dc=c("5"="yellow","6"="orange","12"="purple"),silent=TRUE))
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-12-report_mig_char.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-12-report_mig_char.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-12-report_mig_char.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -27,7 +27,6 @@
 	  r_mig_char<-connect(r_mig_char)
 	  expect_true(is.null(r_mig_char at data$parqual),label="there should be no data in parqual when not qualitative parm are selected")
 	  expect_true(nrow(r_mig_char at data$parquan)>0,"There should be data in the parquan slot when quantitative parm are selected" )
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 test_that("test setasqualitative method",{
@@ -64,7 +63,6 @@
 	  expect_false(r_mig_char at parquan@par_selected=='A124', label="The parameter A124 should have been removed from quant parm")
 	  expect_true('A124'%in%r_mig_char at data$parqual$car_par_code)
 	  expect_false('A124'%in%r_mig_char at data$parquan$car_par_code)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 
 
@@ -99,8 +97,7 @@
 		  silent=TRUE,breaks=c(0,1.5,2.5,10),label=c("age 1","age 2","age 3"))
 	  r_mig_char<-calcule(r_mig_char,silent=TRUE)
 	  expect_true(any(!is.na(r_mig_char at calcdata$car_par_code_qual))&any(!is.na(r_mig_char at calcdata$car_par_code_quan)), label="The merge function works and returns both qualitative and quantitative parameters")
-	  
-	  rm("envir_stacomi",envir =.GlobalEnv)
+
 	})
 
 

Modified: pkg/stacomir/inst/tests/testthat/test-13-report_species.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-13-report_species.R	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/inst/tests/testthat/test-13-report_species.R	2017-06-24 20:08:23 UTC (rev 418)
@@ -72,8 +72,7 @@
 		  mycolorrampyellow(5),
 		  mycolorrampred(5))
 	  plot(bilesp,plot.type="barplot",color=color,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
-	})
+	  })
 
 test_that("test that summary method works",{
 	  require(stacomiR)
@@ -93,6 +92,5 @@
 	  bilesp<-connect(bilesp,silent=TRUE)
 	  bilesp<-calcule(bilesp,silent=TRUE)
 	  summary(bilesp,silent=TRUE)
-	  rm("envir_stacomi",envir =.GlobalEnv)
 	})
 

Modified: pkg/stacomir/man/stacomiR-package.Rd
===================================================================
--- pkg/stacomir/man/stacomiR-package.Rd	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomir/man/stacomiR-package.Rd	2017-06-24 20:08:23 UTC (rev 418)
@@ -3,15 +3,15 @@
 \docType{package}
 \title{package Fish Migration Monitoring (stacomiR)- Stations de Controle des Migrations}
 \description{
-Stacomi enables to read informations in a database about fish migrations to build overviews of fish migrations and creating charts, plots, and summaries.
-The stacomi project comprises an open source Postgres database, and a java interface to fill in data. Please contact the author if you want to try it out.
+'Stacomi' enables to read informations in a database about fish migrations to build overviews of fish migrations and creating charts, plots, and summaries.
+The 'stacomi' project comprises an open source 'Postgres' database, and a 'java' interface to fill in data. Please contact the author if you want to try it out.
 }
 \details{
 \tabular{ll}{
 Package: \tab stacomiR\cr
 Type: \tab Package\cr
 Version: \tab 0.5.3\cr
-Date: \tab 2017-06-19\cr
+Date: \tab 2017-06-24\cr
 License: \tab  GPL (>= 2)\cr
 LazyLoad: \tab yes\cr
 Depends: \tab methods\cr

Modified: pkg/stacomirtools/R/ConnectionODBC.r
===================================================================
--- pkg/stacomirtools/R/ConnectionODBC.r	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomirtools/R/ConnectionODBC.r	2017-06-24 20:08:23 UTC (rev 418)
@@ -49,7 +49,7 @@
 				if (exists("baseODBC",envir=envir_stacomi)){ 
 					object at baseODBC<-get("baseODBC",envir=envir_stacomi) 
 				} else {
-					if(exists("envir_stacomi")){# the program is called within stacomiR
+					if (exists("envir_stacomi")){# the program is called within stacomiR
 						funout(gettext("You need to define a baseODBC vector with the 'ODBC' link, the user and the password\n"),arret=TRUE)
 					} else	  {
 						stop("you need to define a vector baseODBC with the 'ODBC' link, user and password")
@@ -62,14 +62,14 @@
 							case = "tolower",
 							believeNRows = FALSE))
 			if (!exists("odbcConnect")) {
-				if(exists("envir_stacomi")){
+				if (exists("envir_stacomi")){
 					funout("The RODBC library is necessary, please load the package",arret=TRUE)
 				} else	  {
 					stop("the RODBC library is necessary, please load the package")
 				}
 			}
 			if (!object at silent) {
-				if(exists("envir_stacomi")){
+				if (exists("envir_stacomi")){
 					print(paste("connection trial, warning this class should only be used for test: ",object at baseODBC[1]))
 				} else {
 					print(paste("connection trial, warning this class should only be used for test: ",object at baseODBC[1]))
@@ -77,7 +77,7 @@
 			}	
 			# sends the result of a trycatch connection in the
 			#l'object (current connection), e.g. a character vector
-			connection_error<-if(exists("envir_stacomi")){
+			connection_error<-if (exists("envir_stacomi")){
 						error=paste(gettext("Connection failed :\n",object at baseODBC[1]))
 					} else {
 						error="impossible connection"

Modified: pkg/stacomirtools/R/RequeteODBC.r
===================================================================
--- pkg/stacomirtools/R/RequeteODBC.r	2017-06-24 18:58:38 UTC (rev 417)
+++ pkg/stacomirtools/R/RequeteODBC.r	2017-06-24 20:08:23 UTC (rev 418)
@@ -146,7 +146,7 @@
 			}
 			if ((class(resultatRequete)=="data.frame")[1]) {
 				if (!object at silent) funout(msg6)
-				object at query=killfactor(query)     # instead of query 11/08/2009 11:55:20
+				object at query=killfactor(query)    
 				object at etat=msg6
 			} else {
 				if (!object at silent) print(resultatRequete)



More information about the Stacomir-commits mailing list