[Stacomir-commits] r193 - in pkg/stacomir: R examples/02_BilanMigration man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 6 20:38:56 CEST 2016


Author: briand
Date: 2016-09-06 20:38:56 +0200 (Tue, 06 Sep 2016)
New Revision: 193

Modified:
   pkg/stacomir/R/fn_EcritBilanJournalier.r
   pkg/stacomir/R/utilitaires.r
   pkg/stacomir/examples/02_BilanMigration/bilanMigration_Arzal.R
   pkg/stacomir/man/BilanMigration-class.Rd
Log:


Modified: pkg/stacomir/R/fn_EcritBilanJournalier.r
===================================================================
--- pkg/stacomir/R/fn_EcritBilanJournalier.r	2016-09-05 19:24:01 UTC (rev 192)
+++ pkg/stacomir/R/fn_EcritBilanJournalier.r	2016-09-06 18:38:56 UTC (rev 193)
@@ -86,9 +86,12 @@
 			requete<-stacomirtools::connect(requete) 
 			
 		} # end for
+		if (!silent){
 		funout(paste(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,"\n"))
+		}
 		# si l'utilisateur accepte de remplacer les valeurs
 		odbcClose(requete at connection)
+		progres<-get("progres",envir=envir_stacomi)
 		gtkWidgetDestroy(progres)
 		# ecriture egalement du bilan mensuel
 		taxon= as.character(bilanMigration at taxons@data$tax_nom_latin)
@@ -100,12 +103,15 @@
 	
 	if (nrow(bil at data)>0)
 	{ 
+		if (!silent){
 		choice<-gWidgets::gconfirm(paste(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.1, # Un bilan a deja ete ecrit dans la base
 						unique(bil at data$bjo_horodateexport),
 						get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.2),
 				handler=hconfirm) # voulez vous le remplacer ?
+		} else {
+			hconfirm(h=NULL)
+		}
 		
-		
 	}
 	else  # sinon on ecrit les resultats quoiqu'il arrive
 	{
@@ -139,7 +145,7 @@
 			requete<-stacomirtools::connect(requete)   
 		} # end for
 		RODBC::odbcClose(requete at connection)
-		funout(paste(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,"\n"))
+		if (!silent) funout(paste(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,"\n"))
 		taxon= as.character(bilanMigration at taxons@data$tax_nom_latin)
 		stade= as.character(bilanMigration at stades@data$std_libelle)
 		DC=as.numeric(bilanMigration at dc@dc_selectionne)	

Modified: pkg/stacomir/R/utilitaires.r
===================================================================
--- pkg/stacomir/R/utilitaires.r	2016-09-05 19:24:01 UTC (rev 192)
+++ pkg/stacomir/R/utilitaires.r	2016-09-06 18:38:56 UTC (rev 193)
@@ -219,7 +219,7 @@
 #'dispose(progres)
 #' }
 mygtkProgressBar<-function(title,progress_text,width=400,height=50,pulse=TRUE){
-	.dialog <- gWidgetsRGtk2::gtkDialog(title=title, NULL, NULL,
+	.dialog <- RGtk2::gtkDialog(title=title, NULL, NULL,
 			"gtk-close", RGtk2::GtkResponseType["none"],
 			show = FALSE)
 	assign("progres",.dialog,envir=envir_stacomi)

Modified: pkg/stacomir/examples/02_BilanMigration/bilanMigration_Arzal.R
===================================================================
--- pkg/stacomir/examples/02_BilanMigration/bilanMigration_Arzal.R	2016-09-05 19:24:01 UTC (rev 192)
+++ pkg/stacomir/examples/02_BilanMigration/bilanMigration_Arzal.R	2016-09-06 18:38:56 UTC (rev 193)
@@ -36,10 +36,6 @@
 
 #cumulated migration at the station (all stages and DC grouped)
 plot(bM_Arzal,plot.type="step")
-#some plots are a mixture of french and english
-#changing the reference table names to english should shift all to english.
-#same for spanish.
-# combined plot for ggplot2
-plot(bM_Arzal,plot.type="multiple")
+
 # data will be written in the data directory specified in the stacomi/calcmig.csv file
 summary(bM_Arzal)

Modified: pkg/stacomir/man/BilanMigration-class.Rd
===================================================================
--- pkg/stacomir/man/BilanMigration-class.Rd	2016-09-05 19:24:01 UTC (rev 192)
+++ pkg/stacomir/man/BilanMigration-class.Rd	2016-09-06 18:38:56 UTC (rev 193)
@@ -70,11 +70,7 @@
 
 #cumulated migration at the station (all stages and DC grouped)
 plot(bM_Arzal,plot.type="step")
-#some plots are a mixture of french and english
-#changing the reference table names to english should shift all to english.
-#same for spanish.
-# combined plot for ggplot2
-plot(bM_Arzal,plot.type="multiple")
+
 # data will be written in the data directory specified in the stacomi/calcmig.csv file
 summary(bM_Arzal)
 }



More information about the Stacomir-commits mailing list