[Stacomir-commits] r381 - in pkg/stacomir: . R data inst/config inst/examples man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 6 22:06:21 CEST 2017


Author: briand
Date: 2017-06-06 22:06:21 +0200 (Tue, 06 Jun 2017)
New Revision: 381

Added:
   pkg/stacomir/man/choicemult-Refpar-method.Rd
   pkg/stacomir/man/choicemult-Refparqual-method.Rd
Removed:
   pkg/stacomir/vignettes/
Modified:
   pkg/stacomir/DESCRIPTION
   pkg/stacomir/R/BilanAgedemer.r
   pkg/stacomir/R/BilanFonctionnementDC.r
   pkg/stacomir/R/BilanFonctionnementDF.r
   pkg/stacomir/R/BilanMigrationCar.r
   pkg/stacomir/R/BilanMigrationInterAnnuelle.r
   pkg/stacomir/R/BilanMigrationMult.r
   pkg/stacomir/R/BilanMigrationMultConditionEnv.r
   pkg/stacomir/R/BilanOperation.r
   pkg/stacomir/R/Bilan_poids_moyen.r
   pkg/stacomir/R/RefChoix.r
   pkg/stacomir/R/RefDC.r
   pkg/stacomir/R/RefHorodate.r
   pkg/stacomir/R/RefStades.r
   pkg/stacomir/R/RefStationMesure.r
   pkg/stacomir/R/RefTaxon.r
   pkg/stacomir/R/Refpar.r
   pkg/stacomir/R/Refparqual.r
   pkg/stacomir/R/funSousListeBilanMigrationPar.r
   pkg/stacomir/R/fungraph.r
   pkg/stacomir/R/utilitaires.r
   pkg/stacomir/data/bilAM.rda
   pkg/stacomir/data/bilan_adm.rda
   pkg/stacomir/data/bmmCE.rda
   pkg/stacomir/inst/config/generate_Roxygen2.R
   pkg/stacomir/inst/config/generate_data.R
   pkg/stacomir/inst/examples/bilanAgedemer_example.R
   pkg/stacomir/inst/examples/bilanArgentee_example.R
   pkg/stacomir/inst/examples/bilanMigrationInterannuelle_example.R
   pkg/stacomir/inst/examples/bilanMigrationMult_Arzal.R
   pkg/stacomir/inst/examples/bilan_poids_moyen_example.R
   pkg/stacomir/inst/examples/bilancarlot_example.R
   pkg/stacomir/man/BilanAgedemer-class.Rd
   pkg/stacomir/man/BilanArgentee-class.Rd
   pkg/stacomir/man/BilanEspeces-class.Rd
   pkg/stacomir/man/BilanMigrationCar-class.Rd
   pkg/stacomir/man/BilanMigrationInterAnnuelle-class.Rd
   pkg/stacomir/man/BilanMigrationMult-class.Rd
   pkg/stacomir/man/BilanMigrationMultConditionEnv-class.Rd
   pkg/stacomir/man/BilanOperation-class.Rd
   pkg/stacomir/man/Bilan_carlot-class.Rd
   pkg/stacomir/man/Bilan_poids_moyen-class.Rd
   pkg/stacomir/man/calcule-BilanMigrationCar-method.Rd
   pkg/stacomir/man/calcule-BilanMigrationInterAnnuelle-method.Rd
   pkg/stacomir/man/calcule-BilanMigrationMultConditionEnv-method.Rd
   pkg/stacomir/man/choice-Refpar-method.Rd
   pkg/stacomir/man/choice-Refparqual-method.Rd
   pkg/stacomir/man/choice_c-BilanAgedemer-method.Rd
   pkg/stacomir/man/choice_c-BilanConditionEnv-method.Rd
   pkg/stacomir/man/choice_c-BilanMigrationCar-method.Rd
   pkg/stacomir/man/choice_c-BilanMigrationMultConditionEnv-method.Rd
   pkg/stacomir/man/choice_c-RefChoix-method.Rd
   pkg/stacomir/man/choice_c-RefListe-method.Rd
   pkg/stacomir/man/choice_c-RefStades-method.Rd
   pkg/stacomir/man/choice_c-RefStationMesure-method.Rd
   pkg/stacomir/man/choice_c-RefTextBox-method.Rd
   pkg/stacomir/man/choicemult-RefChoix-method.Rd
   pkg/stacomir/man/choicemult-RefHorodate-method.Rd
   pkg/stacomir/man/colortable.Rd
   pkg/stacomir/man/envir_stacomi.Rd
   pkg/stacomir/man/fungraph.Rd
   pkg/stacomir/man/funout.Rd
   pkg/stacomir/man/funtraitementdate.Rd
   pkg/stacomir/man/hbmmCEgraph.Rd
   pkg/stacomir/man/model-Bilan_poids_moyen-method.Rd
   pkg/stacomir/man/mygtkProgressBar.Rd
   pkg/stacomir/man/plot-BilanMigrationCar-missing-method.Rd
   pkg/stacomir/man/plot-BilanMigrationMult-missing-method.Rd
   pkg/stacomir/man/supprime-BilanAgedemer-method.Rd
   pkg/stacomir/man/supprime-RefCoe-method.Rd
   pkg/stacomir/man/write_database-BilanMigration-method.Rd
   pkg/stacomir/man/xtable-BilanMigrationCar-method.Rd
Log:
Changes to pass Rckeck, including assignin almost everything to envir_stacomi

Modified: pkg/stacomir/DESCRIPTION
===================================================================
--- pkg/stacomir/DESCRIPTION	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/DESCRIPTION	2017-06-06 20:06:21 UTC (rev 381)
@@ -6,9 +6,10 @@
 	      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 France
-    by the French Agency for Biodiversity (AFB) institute to centralize data obtained by fishway monitoring.
-    Version 0.5.2 is available in French and English.
+    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.2 is available in French and
+    English.
 License: GPL (>= 2)
 Collate:
     'create_generic.r'

Modified: pkg/stacomir/R/BilanAgedemer.r
===================================================================
--- pkg/stacomir/R/BilanAgedemer.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanAgedemer.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -34,7 +34,7 @@
 #' @family Bilan Objects
 #' @keywords classes
 #' @example inst/examples/bilanAgedemer_example.R
-#' @aliases BilanAgedemer bilA bilanagedemer bilanAgedeMer BilanAgeDeMer bilan_adm
+#' @aliases BilanAgedemer bilanagedemer bilanAgedeMer BilanAgeDeMer
 #' @export 
 setClass(Class="BilanAgedemer",
 		representation= representation(

Modified: pkg/stacomir/R/BilanFonctionnementDC.r
===================================================================
--- pkg/stacomir/R/BilanFonctionnementDC.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanFonctionnementDC.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -191,6 +191,7 @@
 				mygtkProgressBar(
 						title=gettext("time in hours",domain="R-stacomiR"),
 						progress_text=gettext("Working of the counting device",domain="R-stacomiR"))
+				progress_bar<-get("progress_bar",envir=envir_stacomi)
 				# this function assigns
 				z=0 # compteur tableau t_periodefonctdispositif_per_mois
 				for(j in 1:nrow(t_periodefonctdispositif_per)){

Modified: pkg/stacomir/R/BilanFonctionnementDF.r
===================================================================
--- pkg/stacomir/R/BilanFonctionnementDF.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanFonctionnementDF.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -197,6 +197,7 @@
 				mygtkProgressBar(
 						title=gettext("computing ...",domain="R-stacomiR"),
 						progress_text=gettext("Progress %",domain="R-stacomiR"))
+				progress_bar<-get("progress_bar",envir=envir_stacomi)
 				# this function assigns
 				z=0 # compteur tableau t_periodefonctdispositif_per_mois
 				for(j in 1:nrow(t_periodefonctdispositif_per)){

Modified: pkg/stacomir/R/BilanMigrationCar.r
===================================================================
--- pkg/stacomir/R/BilanMigrationCar.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanMigrationCar.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -18,18 +18,18 @@
 #' \code{new("BilanMigrationCar", ...)}.  they are loaded by the interface
 #' using interface_BilanMigrationCar function.
 #' @slot calcdata A "list" of calculated data, filled in by the calcule method
+#' @slot data A \code{data.frame} inherited from \link{Bilan_carlot-class}
+#' @slot dc an object of class \link{RefDC-class} inherited from \link{Bilan_carlot-class}
+#' @slot taxons An object of class \link{RefTaxon-class} inherited from \link{Bilan_carlot-class}
+#' @slot stades An object of class \link{RefStades-class} inherited from \link{Bilan_carlot-class}
+#' @slot horodatedebut An object of class \link{RefHorodate-class} inherited from \link{Bilan_carlot-class}
+#' @slot horodatefin An object of class \link{RefHorodate-class} inherited from \link{Bilan_carlot-class}
+#' @slot par An object of class \link{Refpar-class} inherited from \link{Bilan_carlot-class}
+#' @slot echantillon An object of class \link{RefChoix-class}, vector of choice
 #' @slot parquan An object of class \link{Refparquan-class}, quantitative parameter 
 #' @slot parqual An object of class \link{Refparqual-class}, quanlitative parameter
-#' @slot echantillon An object of class \link{RefChoix-class}, vector of choice
-#' @slot valeurs_possibles A \code{data.frame} choice among possible choice of a qualitative parameter (discrete)
-#' @slot dc an object of class \link{RefDC-class} inherited from \link{BilanMigration-class}
-#' @slot taxons An object of class \link{RefTaxon-class} inherited from \link{BilanMigration-class}
-#' @slot stades An object of class \link{RefStades-class} inherited from \link{BilanMigration-class}
-#' @slot pasDeTemps An object of class \link{PasDeTempsJournalier-class} inherited from \link{BilanMigration-class}
-#' @slot data A \code{data.frame} inherited from \link{BilanMigration-class}, stores the results
-#' @slot time.sequence An object of class "POSIXct" inherited from \link{BilanMigration-class}
 #' @family Bilan Objects
-#' @aliases BilanMigrationMult bilanMigrationMult
+#' @aliases BilanMigrationCar bilanMigrationCar
 #' @note program : default two parameter choice, checking box "none" will allow the program to ignore the parameter
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 #' @concept Bilan Object 
@@ -406,7 +406,6 @@
 #' 
 #' 
 #' @param x An object of class BilanMigrationCar
-#' @param y not used there
 #' @param plot.type One of "qual", "quant" "crossed" default to qual
 #' @param color_parm A named vector for the colors of either parameters (if plot.type=quant) or levels for
 #' parameters (if plot.type=qual).
@@ -513,9 +512,15 @@
 #' @param caption, see xtable
 #' @param label, see xtable
 #' @param align, see xtable, overidden if NULL
+#' @param digits, see xtable
+#' @param display see xtable
+#' @param auto see xtable
 #' @param ... Additional parameters
 #' @export
-setMethod("xtable",signature=signature("BilanMigrationCar"),definition=function(x,caption=NULL, label=NULL,align=NULL,...){
+setMethod("xtable",signature=signature("BilanMigrationCar"),definition=function(x,
+				caption=NULL,
+				label=NULL,
+				align=NULL,...){
 			bmC<-x
 			dat=bmC at data
 			dc=stringr::str_c(bmC at dc@dc_selectionne,collapse=" ")

Modified: pkg/stacomir/R/BilanMigrationInterAnnuelle.r
===================================================================
--- pkg/stacomir/R/BilanMigrationInterAnnuelle.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanMigrationInterAnnuelle.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -3,7 +3,7 @@
 #' When daily bilan are written in the t_bilanjournalier_bjo table by the 
 #' \link{BilanMigration-class} they can be used by this class to display
 #' interannual comparisons of migration. Different charts are produced with different
-#' period grouping. See \link{fn_EcritBilanJournalier} for details about the writing to the
+#' period grouping. See \link{write_database,BilanMigration-method} for details about the writing to the
 #' t_bilanjournalier_bjo table.
 #' 
 #' @include RefAnnee.r

Modified: pkg/stacomir/R/BilanMigrationMult.r
===================================================================
--- pkg/stacomir/R/BilanMigrationMult.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanMigrationMult.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -376,7 +376,6 @@
 #' 		\item{plot.type="multiple"}{Method to overlay graphs for BilanMigrationMult (multiple dc/taxa/stage in the same plot)}
 #' }
 #' @param x An object of class BilanMigrationMult
-#' @param y From the formals but missing
 #' @param plot.type One of "standard","step","multiple". Defaut to \code{standard} the standard BilanMigration with dc and operation displayed, can also be \code{step} or 
 #' \code{multiple} 
 #' @param silent Stops most messages from being displayed

Modified: pkg/stacomir/R/BilanMigrationMultConditionEnv.r
===================================================================
--- pkg/stacomir/R/BilanMigrationMultConditionEnv.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanMigrationMultConditionEnv.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -12,7 +12,7 @@
 #' @author cedric.briand"at"eptb-vilaine.fr marion.legrand"at"logrami.fr
 #' @family Bilan Objects
 #' @keywords classes
-#' @aliases BilanMigrationMultConditionEnv bilanmigrationmultconditionenv bmmCE
+#' @aliases BilanMigrationMultConditionEnv bilanmigrationmultconditionenv
 #' @keywords classes
 #' @example inst/examples/bilanMigrationMultConditionEnv_example.R
 #' @export
@@ -138,7 +138,7 @@
 
 #' internal method for graphical interface
 #' @param h A handler
-hbmmCEgraph = function(h=null,...){   
+hbmmCEgraph = function(h=null){   
 	bmmCE<-get("bmmCE",envir_stacomi)
 	bmmCE<-plot(bmmCE)
 	return(invisible(NULL))	

Modified: pkg/stacomir/R/BilanOperation.r
===================================================================
--- pkg/stacomir/R/BilanOperation.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/BilanOperation.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -19,7 +19,7 @@
 #' \code{\linkS4class{BilanMigrationCar}}
 #' @concept Bilan Object 
 #' @keywords classes
-#' @aliases BilanOperation bilanoperation bilanOperation 
+#' @aliases BilanOperation 
 #' @export 
 setClass(Class="BilanOperation",
 		representation= representation(data="data.frame",

Modified: pkg/stacomir/R/Bilan_poids_moyen.r
===================================================================
--- pkg/stacomir/R/Bilan_poids_moyen.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/Bilan_poids_moyen.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -288,7 +288,6 @@
 #' @param object An object of class \link{Bilan_poids_moyen-class}
 #' @param model.type default "seasonal", "seasonal1","seasonal2","manual". 
 #' @param silent Default FALSE, if TRUE the program should no display messages
-#' @usage model(object,model.type=c("seasonal","seasonal1","seasonal2","manual"),silent=FALSE)
 #' @details 
 #' Depending on model.type several models are produced
 #' \itemize{

Modified: pkg/stacomir/R/RefChoix.r
===================================================================
--- pkg/stacomir/R/RefChoix.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/RefChoix.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -112,13 +112,15 @@
 					svalue(notebook)<-svalue(notebook)+1	
 				}
 			}
-			
+			group<-get("group",envir=envir_stacomi)
 			if (!exists("notebook",envir=envir_stacomi)){
 				notebook <- gnotebook(container=group)
 			} else {
 				notebook<-get("notebook",envir=envir_stacomi)
 			}
-			groupchoice<-ggroup(container=notebook, label=gettext("options",domain="R-stacomiR"),horizontal=FALSE) 
+			groupchoice<-ggroup(container=notebook, 
+					label=gettext("options",domain="R-stacomiR"),
+					horizontal=FALSE) 
 			glabel(object at label,container=groupchoice)
 			list_libelle=fun_char_spe(object at listechoice)
 			choice=gradio(items=list_libelle,

Modified: pkg/stacomir/R/RefDC.r
===================================================================
--- pkg/stacomir/R/RefDC.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/RefDC.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -115,11 +115,26 @@
 						# pas non plus d'appel pour les bilanArgentee dont les slots taxon, stade ,et par sont fixes
 						if("RefTaxon"%in%as.character(getSlots(class(objectBilan)))&class(objectBilan)!="BilanArgentee"&class(objectBilan)!="BilanAgedemer"){
 							objectBilan at taxons<<-charge_avec_filtre(object=objectBilan at taxons,dc_selectionne=get("refDC",object,envir_stacomi)@dc_selectionne)
-							if (exists("frame_tax")) delete(group,frame_tax)
-							if (exists("frame_std")) delete(group,frame_std)
-							if (exists("frame_par")) delete(group,frame_par)
-							if (exists("frame_parquan")) delete(group,frame_parquan)
-							if (exists("frame_parqual")) delete(group,frame_parqual)
+							if (exists("frame_tax",envir=envir_stacomi)) {
+								frame_tax<-get("frame_tax",envir=envir_stacomi)
+								delete(group,frame_tax)
+							}
+							if (exists("frame_std",envir=envir_stacomi)) {
+								frame_std<-get("frame_std",envir=envir_stacomi)
+								delete(group,frame_std)
+							}
+							if (exists("frame_par",envir=envir_stacomi)) {
+								frame_par<-get("frame_par",envir=envir_stacomi)
+								delete(group,frame_par)
+							}
+							if (exists("frame_parquan",envir=envir_stacomi)) {
+								frame_parquan<-get("frame_parquan",envir=envir_stacomi)
+								delete(group,frame_parquan)
+							}
+							if (exists("frame_parqual",envir=envir_stacomi)) {
+								frame_parqual<-get("frame_parqual",envir=envir_stacomi)
+								delete(group,frame_parqual)
+							}
 							choice(objectBilan at taxons,objectBilan,is.enabled=TRUE)
 							funout(gettext("Select taxa for this counting device (for all periods)\n",domain="R-stacomiR"))
 						}

Modified: pkg/stacomir/R/RefHorodate.r
===================================================================
--- pkg/stacomir/R/RefHorodate.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/RefHorodate.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -173,36 +173,42 @@
 #' @param label the name to write in the frame
 #' @param nomassign the name with which the frame will be assigned to envir_stacomi
 #' @param funoutlabel the sentence to write when the choice has been made
+#' @param decal Default year will be current year, use -1 to set the default value in the interface to the year before
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 setMethod("choicemult",signature=signature("RefHorodate"),definition=function(object,
 				label="date",
 				nomassign="horodate",
 				funoutlabel="nous avons le choix dans la date\n",
 				decal=0
-				) {
-				hhoro=function(h,...){
-					object=setRefHorodate(object,svalue(horodate))
-					assign(nomassign,object at horodate,envir_stacomi)
-					funout(gettext("Horodate selected\n",domain="R-stacomiR"))				
-					# changing tab of notebook to next tab
-					if (svalue(notebook)<length(notebook)){
-						svalue(notebook)<-svalue(notebook)+1	
-					}
+		) {
+			hhoro=function(h,...){
+				object=setRefHorodate(object,svalue(horodate))
+				assign(nomassign,object at horodate,envir_stacomi)
+				funout(gettext("Horodate selected\n",domain="R-stacomiR"))				
+				# changing tab of notebook to next tab
+				if (svalue(notebook)<length(notebook)){
+					svalue(notebook)<-svalue(notebook)+1	
 				}
-				if (decal!=0){
-					# Returns the first horodate of a year shifted by decal
-					# @param horodate The horodate to shift (class POSIXt)
-					# @param decal number of year to shift
-					# @return A POSIXt
-					shiftyear<-function(horodate,decal){
-						anneeprec=as.numeric(strftime(horodate,"%Y"))+decal
-						return(strptime(paste(anneeprec,"-01-01",sep=""),format="%Y-%m-%d"))
-					}
-					object at horodate<-shiftyear(object at horodate,decal)
+			}
+			if (decal!=0){
+				# Returns the first horodate of a year shifted by decal
+				# @param horodate The horodate to shift (class POSIXt)
+				# @param decal number of year to shift
+				# @return A POSIXt
+				shiftyear<-function(horodate,decal){
+					anneeprec=as.numeric(strftime(horodate,"%Y"))+decal
+					return(strptime(paste(anneeprec,"-01-01",sep=""),format="%Y-%m-%d"))
 				}
-				if (!exists("notebook",envir_stacomi)) notebook <- gnotebook(container=group) else
-					notebook<-get("notebook",envir=envir_stacomi)
-				grouphorodate<-ggroup(container=notebook, label=label,horizontal=FALSE) 
-				horodate<-gedit(getRefHorodate(object),container=grouphorodate,handler=hhoro,width=20)			
-				gbutton("OK", container=grouphorodate,handler=hhoro,icon="execute")			
+				object at horodate<-shiftyear(object at horodate,decal)
+			}
+			
+			if (!exists("notebook",envir_stacomi)){ 
+				group<-get("group",envir_stacomi)
+				notebook <- gnotebook(container=group)} 
+			else {
+				notebook<-get("notebook",envir=envir_stacomi)
+			}
+			grouphorodate<-ggroup(container=notebook, label=label,horizontal=FALSE) 
+			horodate<-gedit(getRefHorodate(object),container=grouphorodate,handler=hhoro,width=20)			
+			gbutton("OK", container=grouphorodate,handler=hhoro,icon="execute")			
 		})
\ No newline at end of file

Modified: pkg/stacomir/R/RefStades.r
===================================================================
--- pkg/stacomir/R/RefStades.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/RefStades.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -94,7 +94,10 @@
 									dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,
 									taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,
 									stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
-							if (exists("frame_par")) delete(group,frame_par)
+							
+							if (exists("frame_par",envir_stacomi)){
+								delete(group,get("frame_par",envir_stacomi))
+							} 
 							choice(objectBilan at par,is.enabled=TRUE)
 						} 
 						#il y a bien un object parqual dans l'object Bilan						
@@ -104,7 +107,9 @@
 									taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,
 									stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
 							
-							if (exists("frame_parqual")) delete(group,frame_parqual)
+							if (exists("frame_parqual",envir_stacomi)) {
+								delete(group,get("frame_parqual",envir_stacomi))
+							}
 							choice(objectBilan at parqual,label=gettext("Qualitative feature",domain="R-stacomiR"),
 									nomassign="refparqual",
 									frameassign="frame_parqual",is.enabled=TRUE)
@@ -123,7 +128,10 @@
 													is.na(objectBilan at parquan@data$par_code)|objectBilan at parquan@data$par_code=="C001",]     # aucune
 								}
 							}
-							if (exists("frame_parquan")) delete(group,frame_parquan)
+							if (exists("frame_parquan",envir_stacomi)){
+								delete(group,get("frame_parquan",envir_stacomi))
+							
+						} 
 							choice(objectBilan at parquan,label=gettext("Quantitative feature",domain="R-stacomiR"),
 									nomassign="refparquan",
 									frameassign="frame_parquan",is.enabled=TRUE)
@@ -233,8 +241,13 @@
 				}
 				# below the widget structure [=> within (=> type
 				# group(ggroup)[notebook(notebook)[groupstd(ggroup&tab)[[framestdsource(gframe)[tbsourcestd(gtable)],framestddest(gframe)[tbdeststd(gtable)]],OKbutton]]
-				if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group)  else
-					notebook<-get("notebook",envir=envir_stacomi)				
+				
+				if (!exists("notebook",envir=envir_stacomi)) {
+					group<-get("group",envir_stacomi)
+					notebook <- gnotebook(container=group)
+				} else {
+					notebook<-get("notebook",envir=envir_stacomi)	
+					}
 				std_libelle=fun_char_spe(object at data$std_libelle)
 				groupstd<-ggroup() 
 				assign("goupstd",groupstd,envir=envir_stacomi)

Modified: pkg/stacomir/R/RefStationMesure.r
===================================================================
--- pkg/stacomir/R/RefStationMesure.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/RefStationMesure.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -44,7 +44,6 @@
 #' @param object An object of class \link{RefStationMesure-class}
 #' @param is.enabled A boolean parameter, if TRUE the frame is enabled when first displayed
 #' @param title The title of the frame, defaut to "Monitoring stations selection" 
-#' @param stationMesure A character, the code of the monitoring station, which records environmental parameters \link{choice_c,RefStationMesure-method}
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 #' @examples  
 #' \dontrun{

Modified: pkg/stacomir/R/RefTaxon.r
===================================================================
--- pkg/stacomir/R/RefTaxon.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/RefTaxon.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -81,10 +81,18 @@
 					funout(gettext("Taxon selected\n",domain="R-stacomiR"))
 					if (!is.null(objectBilan)) {
 						objectBilan at stades<<-charge_avec_filtre(object=objectBilan at stades,dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code)
-						if (exists("frame_std")) delete(group,frame_std)
-						if (exists("frame_par")) delete(group,frame_par)
-						if (exists("frame_parquan")) delete(group,frame_parquan)
-						if (exists("frame_parqual")) delete(group,frame_parqual)
+						if (exists("frame_std",envir_stacomi)){
+							delete(group,get("frame_std",envir_stacomi))
+						}
+						if (exists("frame_par")) {
+							delete(group,get("frame_par",envir_stacomi))
+						}
+						if (exists("frame_parquan")) {
+							delete(group,get("frame_parquan",envir_stacomi))
+						}
+						if (exists("frame_parqual")) {
+							delete(group,get("frame_parqual",envir_stacomi))
+						}
 						choice(objectBilan at stades,objectBilan,is.enabled=TRUE)						
 					}
 				}
@@ -148,8 +156,12 @@
 				}
 				# below the widget structure [=> within (=> type
 				# group(ggroup)[notebook(notebook)[grouptaxon(ggroup&tab)[[frametaxonsource(gframe)[tbsourcetaxon(gtable)],frametaxondest(gframe)[tbdtaxondest(gtable)]],OKbutton]]
-				if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group)  else
-					notebook<-get("notebook",envir=envir_stacomi)				
+				if (!exists("notebook",envir_stacomi)){ 
+					group<-get("group",envir_stacomi)
+					notebook <- gnotebook(container=group)} 
+				else {
+					notebook<-get("notebook",envir=envir_stacomi)
+				}			
 				tax_libelle=fun_char_spe(object at data$tax_nom_latin)
 				grouptaxon<-ggroup() 
 				assign("grouptaxon",grouptaxon,envir_stacomi)

Modified: pkg/stacomir/R/Refpar.r
===================================================================
--- pkg/stacomir/R/Refpar.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/Refpar.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -166,10 +166,12 @@
 		})
 
 
-#' Multiple Choice method for Refpar referential objects
+#' Multiple Choice method for Refpar referential objects, internal use
 #' 
 #' @param object An object of class \link{Refpar-class}
 #' @param objectBilan An object Bilan which includes the \link{Refpar-class}, default NULL
+#' @param label The name for the frame
+#' @param nomassign The name by which the widget will be assigned in envir_stacomi 
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 #' @examples 
 #' \dontrun{
@@ -181,7 +183,8 @@
 #' objectBilan=bilan_taille # for other test
 #' choicemult(object,objectBilan=bilanMigrationCar)	
 #' }
-setMethod("choicemult",signature=signature("Refpar"),definition=function(object,objectBilan=NULL,
+setMethod("choicemult",signature=signature("Refpar"),definition=function(object,
+				objectBilan=NULL,
 				label=gettext("Sample characteristic",domain="R-stacomiR"),
 				nomassign="refpar") {
 			
@@ -210,8 +213,12 @@
 				}
 				# below the widget structure [=> within (=> type
 				# group(ggroup)[notebook(notebook)[groupstd(ggroup&tab)[[framestdsource(gframe)[tbsourcestd(gtable)],framestddest(gframe)[tbdeststd(gtable)]],OKbutton]]
-				if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group) else
-					notebook<-get("notebook",envir=envir_stacomi)
+				if (!exists("notebook",envir_stacomi)){ 
+							group<-get("group",envir_stacomi)
+							notebook <- gnotebook(container=group)} 
+						else {
+							notebook<-get("notebook",envir=envir_stacomi)
+						}
 				car_libelle=fun_char_spe(object at data$par_nom)
 				car_libelle[nchar(car_libelle)>30]<-paste(substr(car_libelle[nchar(car_libelle)>30],1,30),".",sep="")
 				grouppar<-ggroup() 

Modified: pkg/stacomir/R/Refparqual.r
===================================================================
--- pkg/stacomir/R/Refparqual.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/Refparqual.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -155,11 +155,11 @@
 				hpar=function(h,...){
 					parm=tbdestpar[,][tbdestpar[,]!=""]
 					if (length(parm)>0){
-					object at par_selectionne<-object at data[car_libelle%in%parm ,"par_code"]
-					# below the line that changes from the Refpar
-					object<-charge_complement(object)
-					assign(nomassign,object,envir_stacomi)
-					funout(gettext("Parameter selected\n",domain="R-stacomiR"))
+						object at par_selectionne<-object at data[car_libelle%in%parm ,"par_code"]
+						# below the line that changes from the Refpar
+						object<-charge_complement(object)
+						assign(nomassign,object,envir_stacomi)
+						funout(gettext("Parameter selected\n",domain="R-stacomiR"))
 					} else {
 						funout(gettext("No Parameter selected\n",domain="R-stacomiR"))	
 					}
@@ -175,8 +175,12 @@
 				}
 				# below the widget structure [=> within (=> type
 				# group(ggroup)[notebook(notebook)[groupstd(ggroup&tab)[[framestdsource(gframe)[tbsourcestd(gtable)],framestddest(gframe)[tbdeststd(gtable)]],OKbutton]]
-				if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group) else
+				if (!exists("notebook",envir_stacomi)){ 
+					group<-get("group",envir_stacomi)
+					notebook <- gnotebook(container=group)} 
+				else {
 					notebook<-get("notebook",envir=envir_stacomi)
+				}
 				car_libelle=fun_char_spe(object at data$par_nom)
 				car_libelle[nchar(car_libelle)>30]<-paste(substr(car_libelle[nchar(car_libelle)>30],1,30),".",sep="")
 				grouppar<-ggroup() 

Modified: pkg/stacomir/R/funSousListeBilanMigrationPar.r
===================================================================
--- pkg/stacomir/R/funSousListeBilanMigrationPar.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/funSousListeBilanMigrationPar.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -20,6 +20,7 @@
 	req at baseODBC<-get("baseODBC", envir=envir_stacomi)
 	mygtkProgressBar(title="cumul val. quant. par pas de temps",
 			progress_text=gettext("Progress %",domain="R-stacomiR"))
+	progress_bar<-get("progress_bar",envir_stacomi)
 
 	##############################			
 	on.exit(dispose(progres))

Modified: pkg/stacomir/R/fungraph.r
===================================================================
--- pkg/stacomir/R/fungraph.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/fungraph.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -3,7 +3,6 @@
 #' This graph is for species other than glass eel
 #' 
 #' 
-#' @usage fungraph(bilanMigration, tableau, time.sequence, taxon, stade, dc=NULL,silent,...)
 #' @param bilanMigration An object of class \code{\linkS4class{BilanMigration}}
 #' @param tableau A data frame with the with the following columns : No.pas,debut_pas,fin_pas,              
 #' ope_dic_identifiant,lot_tax_code,lot_std_code,type_de_quantite,MESURE,CALCULE,               

Modified: pkg/stacomir/R/utilitaires.r
===================================================================
--- pkg/stacomir/R/utilitaires.r	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/R/utilitaires.r	2017-06-06 20:06:21 UTC (rev 381)
@@ -217,10 +217,10 @@
 } 
 
 
-#' Progress bar using a gtkdialog, the progress bar is assigned in .GlobalEnv
+#' Progress bar using a gtkdialog, the progress bar is assigned in envir_stacomi
 #' This progress bar has a button to close.
-#' @note The name of the progress bar is \code{progres}, it will be assigned in .GlobalEnv,
-#' it contains a progress bar widget named progress bar, also assigned in .GLobalEnv. See example for use.
+#' @note The name of the progress bar is \code{progres}, it will be assigned in envir_stacomi,
+#' it contains a progress bar widget named progress bar, also assigned in envir_stacomi See example for use.
 #' @param title The title of the bar
 #' @param progress_text The text to display for progression
 #' @param width Width of the progress bar
@@ -233,7 +233,8 @@
 #' \dontrun{
 #' mygtkProgressBar(title="Trial",progress_text="progress text")
 #' fraction_progressed=seq(0,1,length.out=50)
-#' for(i in fraction_progressed) {
+#'  progress_bar<-get("progress_bar",envir_stacomi)
+#' for(i in fraction_progressed){ 
 #'      Sys.sleep(0.1)
 #'    progress_bar$setText(sprintf("%d%% progression",round(100*i)))
 #'     progress_bar$setFraction(i)
@@ -327,6 +328,7 @@
 #' @param mois logical, add column with month
 #' @param quinzaine logical, add column with 15 days
 #' @param semaine logical, add column with weeks
+#' @param semaine_std logical, add column with standard weeks (using isoweek from lubridate)
 #' @param jour_an logical, add column with day of year
 #' @param jour_mois logical, add column with day of month
 #' @param heure logical, add column with hour

Modified: pkg/stacomir/data/bilAM.rda
===================================================================
(Binary files differ)

Modified: pkg/stacomir/data/bilan_adm.rda
===================================================================
(Binary files differ)

Modified: pkg/stacomir/data/bmmCE.rda
===================================================================
(Binary files differ)

Modified: pkg/stacomir/inst/config/generate_Roxygen2.R
===================================================================
--- pkg/stacomir/inst/config/generate_Roxygen2.R	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/inst/config/generate_Roxygen2.R	2017-06-06 20:06:21 UTC (rev 381)
@@ -24,10 +24,10 @@
 ##use either :
 require(devtools)
 # uncomment lines in stacomi to run the program (calcmig and envir_stacomi necessary)
-document("F:/workspace/stacomir/pkg/stacomir")
+document("C:/workspace/stacomir/pkg/stacomir")
 ## or :
 ##vignette("roxygen2")
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 #data("bMM_Arzal")
 #data("bM_Arzal")
 envir_stacomi <- new.env(parent = emptyenv())
@@ -37,7 +37,7 @@
 require(roxygen2)
 
 #Pour Cédric
-roxygen2::roxygenise("F:/workspace/stacomir/pkg/stacomir");warnings()[1:10]
+roxygen2::roxygenise("C:/workspace/stacomir/pkg/stacomir");warnings()[1:10]
 
 #Pour Marion 
 #roxygen2::roxygenise("C:/Users/logrami/workspace/stacomir/pkg/stacomir");warnings()[1:10]

Modified: pkg/stacomir/inst/config/generate_data.R
===================================================================
--- pkg/stacomir/inst/config/generate_data.R	2017-06-05 20:09:53 UTC (rev 380)
+++ pkg/stacomir/inst/config/generate_data.R	2017-06-06 20:06:21 UTC (rev 381)
@@ -16,14 +16,14 @@
 ##################################
 filecsv<-"C:/Program Files/stacomi/calcmig.csv"
 calcmig<-utils::read.csv(filecsv,header=TRUE,sep=";")
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 devtools::use_data(calcmig,internal=FALSE,overwrite=TRUE)
 
 #################################
 # generates a dataset with Durif coefficients
 # source Laurent Beaulaton
 ##################################
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 coef_Durif = matrix(NA, nrow=5, ncol=6)
 colnames(coef_Durif) = c("I", "FII", "FIII", "FIV", "FV", "MII")
 rownames(coef_Durif) = c("Constant", "BL", "W", "MD", "FL")
@@ -59,7 +59,7 @@
 bMM_Arzal at dc@data[,"dif_localisation"]<-iconv(bMM_Arzal at dc@data[,"dif_localisation"],from="latin1",to="UTF8")
 bMM_Arzal at taxons@data[,"tax_nom_commun"]<-iconv(bMM_Arzal at taxons@data[,"tax_nom_commun"],from="latin1",to="UTF8")
 bMM_Arzal at stades@data[,"std_libelle"]<-iconv(bMM_Arzal at stades@data[,"std_libelle"],from="latin1",to="UTF8")
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 devtools::use_data(bMM_Arzal,internal=FALSE,overwrite=TRUE)
 bilanOperation<-get("bilanOperation",envir=envir_stacomi)
 bilanOperation at data$ope_commentaires<-iconv(bilanOperation at data$ope_commentaires,from="latin1",to="UTF8")
@@ -118,7 +118,7 @@
 bM_Arzal at dc@data[,"dif_localisation"]<-iconv(bM_Arzal at dc@data[,"dif_localisation"],from="latin1",to="UTF8")
 bM_Arzal at taxons@data[,"tax_nom_commun"]<-iconv(bM_Arzal at taxons@data[,"tax_nom_commun"],from="latin1",to="UTF8")
 bM_Arzal at stades@data[,"std_libelle"]<-iconv(bM_Arzal at stades@data[,"std_libelle"],from="latin1",to="UTF8")
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 devtools::use_data(bM_Arzal,internal=FALSE,overwrite=TRUE)
 
 
@@ -175,14 +175,14 @@
 bfDF at data$per_commentaires<-iconv(bfDF at data$per_commentaires,from="latin1",to="UTF8")
 #plot(bfDF,plot.type="1")
 #plot(bfDF,plot.type="2",title="A nice title")
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 devtools::use_data(bfDF,internal=FALSE,overwrite=TRUE)
 
 
 #################################
 # generates dataset for BilanFonctionnementDC
 ##################################
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 require(stacomiR)
 stacomi(gr_interface=FALSE,
 		login_window=FALSE,
@@ -204,13 +204,13 @@
 bfDC at data$per_commentaires<-iconv(bfDC at data$per_commentaires,from="latin1",to="UTF8")
 #plot(bfDC,plot.type="1")
 #plot(bfDC,plot.type="2",title="A nice title")
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 devtools::use_data(bfDC,internal=FALSE,overwrite=TRUE)
 
 #################################
 # generates dataset for Bilan_carlot
 ##################################
-setwd("F:/workspace/stacomir/pkg/stacomir")
+setwd("C:/workspace/stacomir/pkg/stacomir")
 require(stacomiR)
 stacomi(gr_interface=FALSE,
 		login_window=FALSE,
@@ -243,13 +243,13 @@
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/stacomir -r 381


More information about the Stacomir-commits mailing list