[Stacomir-commits] r159 - in branch0.5/stacomir: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 19 09:58:03 CEST 2016
Author: briand
Date: 2016-08-19 09:58:03 +0200 (Fri, 19 Aug 2016)
New Revision: 159
Removed:
branch0.5/stacomir/man/handler_graph_functions.Rd
Modified:
branch0.5/stacomir/NAMESPACE
branch0.5/stacomir/R/BilanConditionEnv.r
branch0.5/stacomir/R/BilanEspeces.r
branch0.5/stacomir/R/BilanFonctionnementDC.r
branch0.5/stacomir/R/BilanFonctionnementDF.r
branch0.5/stacomir/R/BilanMigration.r
branch0.5/stacomir/R/BilanMigrationInterAnnuelle.r
branch0.5/stacomir/R/BilanMigrationMult.r
branch0.5/stacomir/R/Bilan_carlot.r
branch0.5/stacomir/R/Bilan_poids_moyen.r
branch0.5/stacomir/R/Bilan_stades_pigm.r
branch0.5/stacomir/R/Bilan_taille.r
branch0.5/stacomir/R/RefAnnee.r
branch0.5/stacomir/R/RefCoe.r
branch0.5/stacomir/R/RefDC.r
branch0.5/stacomir/R/RefDF.r
branch0.5/stacomir/R/RefMsg.r
branch0.5/stacomir/R/RefPoidsMoyenPeche.r
branch0.5/stacomir/R/RefStades.r
branch0.5/stacomir/R/RefStationMesure.r
branch0.5/stacomir/R/RefTaxon.r
branch0.5/stacomir/R/Refpar.r
branch0.5/stacomir/R/Refparqual.r
branch0.5/stacomir/R/Refparquan.r
branch0.5/stacomir/R/ReftextBox.r
branch0.5/stacomir/R/fn_EcritBilanJournalier.r
branch0.5/stacomir/R/fn_EcritBilanMensuel.r
branch0.5/stacomir/R/funBilanMigrationAnnuel.r
branch0.5/stacomir/R/funSousListeBilanMigration.r
branch0.5/stacomir/R/funSousListeBilanMigrationPar.r
branch0.5/stacomir/R/fungraph.r
branch0.5/stacomir/R/fungraph_civelle.r
branch0.5/stacomir/R/funtraitement_poids.r
branch0.5/stacomir/R/interface_BilanConditionEnv.r
branch0.5/stacomir/R/interface_BilanFonctionnementDC.r
branch0.5/stacomir/R/interface_BilanFonctionnementDF.r
branch0.5/stacomir/R/interface_BilanMigration.r
branch0.5/stacomir/R/interface_BilanMigrationConditionEnv.r
branch0.5/stacomir/R/interface_BilanMigrationInterannuelle.r
branch0.5/stacomir/R/interface_BilanMigrationMult.r
branch0.5/stacomir/R/interface_BilanMigrationPar.r
branch0.5/stacomir/R/interface_Bilan_lot.r
branch0.5/stacomir/R/interface_Bilan_taille.r
branch0.5/stacomir/R/interface_bilan_poids_moyen.r
branch0.5/stacomir/R/interface_chooselang.r
branch0.5/stacomir/R/stacomi.r
branch0.5/stacomir/man/RefTextBox-class.Rd
branch0.5/stacomir/man/hCamembert.Rd
branch0.5/stacomir/man/hDF.Rd
branch0.5/stacomir/man/hTableBilanMigration.Rd
branch0.5/stacomir/man/hbilanMigrationcalc.Rd
branch0.5/stacomir/man/hbilanMigrationgraph.Rd
branch0.5/stacomir/man/hbilanMigrationgraph2.Rd
Log:
Changes for Rcheck
Modified: branch0.5/stacomir/NAMESPACE
===================================================================
--- branch0.5/stacomir/NAMESPACE 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/NAMESPACE 2016-08-19 07:58:03 UTC (rev 159)
@@ -51,15 +51,26 @@
import(gWidgets)
import(gWidgetsRGtk2)
import(ggplot2)
+import(methods)
import(sqldf)
+import(stacomirtools)
import(stringr)
importFrom(RODBC,odbcClose)
+importFrom(grDevices,X11)
+importFrom(grDevices,gray)
+importFrom(grDevices,rainbow)
importFrom(grDevices,x11)
importFrom(graphics,axis)
importFrom(graphics,axis.Date)
+importFrom(graphics,layout)
importFrom(graphics,legend)
+importFrom(graphics,matplot)
+importFrom(graphics,mtext)
importFrom(graphics,par)
+importFrom(graphics,points)
+importFrom(graphics,polygon)
importFrom(graphics,rect)
+importFrom(graphics,segments)
importFrom(graphics,text)
importFrom(grid,gpar)
importFrom(grid,grid.layout)
@@ -75,10 +86,19 @@
importFrom(lattice,trellis.par.set)
importFrom(reshape2,dcast)
importFrom(reshape2,melt)
+importFrom(stats,as.formula)
+importFrom(stats,coef)
importFrom(stats,ftable)
+importFrom(stats,na.fail)
+importFrom(stats,nls)
+importFrom(stats,pbeta)
+importFrom(stats,predict)
+importFrom(stats,sd)
importFrom(stats,xtabs)
importFrom(utils,globalVariables)
importFrom(utils,read.csv)
+importFrom(utils,select.list)
importFrom(utils,setWinProgressBar)
importFrom(utils,stack)
importFrom(utils,winProgressBar)
+importFrom(utils,write.table)
Modified: branch0.5/stacomir/R/BilanConditionEnv.r
===================================================================
--- branch0.5/stacomir/R/BilanConditionEnv.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanConditionEnv.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -71,7 +71,7 @@
requete at order_by<-"ORDER BY env_stm_identifiant, env_date_debut"
tmp<-vector_to_listsql(object at stationMesure@data$stm_identifiant)
requete at and=paste(" AND env_stm_identifiant IN ",tmp )
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
object at data<-stacomirtools::killfactor(requete at query)
funout(get("msg",envir=envir_stacomi)$BilanCondtionEnv.1)
return(object)
Modified: branch0.5/stacomir/R/BilanEspeces.r
===================================================================
--- branch0.5/stacomir/R/BilanEspeces.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanEspeces.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -81,7 +81,7 @@
" AND lot_lot_identifiant IS NULL",
" AND lot_effectif IS NOT NULL",
sep="")
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
if (requete at etat!="Requete reussie \n") funout(get("msg",envir=envir_stacomi)$BilanEspeces.3,arret=TRUE)
bilanEspeces at data<-requete at query
return(bilanEspeces)
@@ -137,11 +137,11 @@
})
-#' handler du calcul hCamembert
-#' trace un camembert des especes ou un camembert par periode...
-#' @note pas besoin de refaire tourner calcul si une autre liste � �t� charg�e, les effectifs <0 sont transform�s en positifs
-#' @param h
-#' @param ...
+#' handler for pie chart
+#' draws a pie chart of species or a pie chart per period
+#' @note no need to re-run calcul if another list has been loaded, negative numbers are converted to positive
+#' @param h handler
+#' @param ... other parameters passed to the function
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
#' @export
@@ -193,7 +193,7 @@
} else if (nb<=12){
p<-g+scale_fill_brewer(palette="Set3",name="Taxa")
}else{
- g<-g+scale_fill_manual(values=rainbow(nb))
+ g<-g+scale_fill_manual(values=grDevices::rainbow(nb))
}
if(h$action=="pie"){
g<-g+ coord_polar(theta="y", start=pi)+xlab('') +ylab('')
@@ -259,7 +259,7 @@
vecteur=c("aucun","semaine","mois","annee"),
label=get("msg",envir=envir_stacomi)$interface_BilanEspeces.7)
quitte()
- group = ggroup(horizontal=FALSE) # doit toujours s'appeller group
+ group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
assign("group",group,envir = .GlobalEnv)
gl=glabel(text=get("msg",envir=envir_stacomi)$interface_BilanEspeces.2,container=group)
add(ggroupboutons,group)
@@ -277,20 +277,20 @@
affichecal=FALSE)
choix(bilanEspeces at dc,objectBilan=bilanEspeces,is.enabled=TRUE)
choix(bilanEspeces at liste)
- ggroupboutonsbas = ggroup(horizontal=FALSE)
+ ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
assign("ggroupboutonsbas",ggroupboutonsbas, envir=.GlobalEnv)
- add(ggroupboutons,ggroupboutonsbas)
+ gWidgets::add(ggroupboutons,ggroupboutonsbas)
toolbarlist = list(
- Calc=gaction(handler=hBilanEspecescalc, action=bilanEspeces, icon="new", label="calcul", tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.3),
- Graph=gaction(label="pie",tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.4,icon="bubbles",handler=hCamembert,action="pie"),
- Graph2=gaction(handler=hCamembert, icon="barplot", label="histo", tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.5,action="graph"),
- Stat=gaction(handler=hTableBilanEspeces, icon="dataframe", label="stat", tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.6),
- annuler=gaction(handler= quitte,icon = "close",label="quitter")
+ Calc=gWidgets::gaction(handler=hBilanEspecescalc, action=bilanEspeces, icon="new", label="calcul", tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.3),
+ Graph=gWidgets::gaction(label="pie",tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.4,icon="bubbles",handler=hCamembert,action="pie"),
+ Graph2=gWidgets::gaction(handler=hCamembert, icon="barplot", label="histo", tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.5,action="graph"),
+ Stat=gWidgets::gaction(handler=hTableBilanEspeces, icon="dataframe", label="stat", tooltip=get("msg",envir=envir_stacomi)$interface_BilanEspeces.6),
+ annuler=gWidgets::gaction(handler= quitte,icon = "close",label="quitter")
)
- #add(ggroupboutonsbas, gtoolbar(toolbarlist))
- #addSpring(group)
+ #gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
+ #gWidgets::addSpring(group)
#graphes=ggraphics(width=600,height=400)
add(ggrouptotal1,graphes ) # on ajoute au groupe horizontal
- x11()
+ grDevice::X11()
assign("graphes",graphes,envir=.GlobalEnv)
}
\ No newline at end of file
Modified: branch0.5/stacomir/R/BilanFonctionnementDC.r
===================================================================
--- branch0.5/stacomir/R/BilanFonctionnementDC.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanFonctionnementDC.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -64,7 +64,7 @@
object at requete@order_by<-"ORDER BY per_date_debut"
object at requete@and<-paste("AND per_dis_identifiant=",object at dc@dc_selectionne )
#object at requete@where=#defini dans la methode ODBCwheredate
- object at requete<-connect(object at requete) # appel de la methode connect de l'object ODBCWHEREDATE
+ object at requete<-stacomirtools::connect(object at requete) # appel de la methode connect de l'object ODBCWHEREDATE
funout(get("msg",envir_stacomi)$BilanFonctionnementDC.1)
return(object)
})
Modified: branch0.5/stacomir/R/BilanFonctionnementDF.r
===================================================================
--- branch0.5/stacomir/R/BilanFonctionnementDF.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanFonctionnementDF.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -61,7 +61,7 @@
object at requete@order_by="ORDER BY per_date_debut"
object at requete@and=paste("AND per_dis_identifiant=",object at df@df_selectionne )
#object at requete@where=#defini dans la methode ODBCwheredate
- object at requete<-connect(object at requete) # appel de la methode connect de l'object ODBCWHEREDATE
+ object at requete<-stacomirtools::connect(object at requete) # appel de la methode connect de l'object ODBCWHEREDATE
funout(get("msg",envir=envir_stacomi)$BilanFonctionnementDF.1)
return(object)
})
@@ -182,10 +182,10 @@
scale_fill_manual(values = c("#E41A1C","#4DAF4A"))
if(length(unique(t_periodefonctdispositif_per_mois$annee))>1) {
- grDevices::x11(40,40); print(g)
- grDevices::x11 (40,40) ;print(g1)
+ grDevices::X11(40,40); print(g)
+ grDevices::X11 (40,40) ;print(g1)
}else {
- x11(60,40)
+ X11(60,40)
vplayout <- function(x, y) { grid::viewport(layout.pos.row = x, layout.pos.col = y) }
grid::grid.newpage()
grid::pushViewport(grid::viewport(layout = grid::grid.layout(1,2,just="center")))
Modified: branch0.5/stacomir/R/BilanMigration.r
===================================================================
--- branch0.5/stacomir/R/BilanMigration.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanMigration.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -81,11 +81,11 @@
}
)
-#' handler du graphique BilanMigration
-#' realise le calcul du bilan migration, l'ecrit dans l'environnement envir_stacomi
-#' traite eventuellement les quantites de lots (si c'est des civelles)
-#' @param h
-#' @param ...
+#' handler for calculations BilanMigration
+#'
+#' internal use
+#' @param h handler
+#' @param ... additional parameters
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
hbilanMigrationcalc=function(h,...){
calcule( h$action)
@@ -168,10 +168,9 @@
-#' handler du calcul hBilanMigrationgraph
-#' appelle les fonctions fungraph pour faire le bilan des migrations
-#' et permet la sauvegarde des bilans journaliers dans la base
-#' @note pb si autre chose que journalier les pas de temps ont �t� contraints � des pas de temps journaliers pour ce graphique
+#' handler hBilanMigrationgraph
+#' calls the fungraph for BilanMigration and allows the saving of daily and monthly counts in the database
+#' @note pb if other than daily value, the time steps have been constrained to daily values for this plot
#' @param h
#' @param ...
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
@@ -205,11 +204,11 @@
fn_EcritBilanJournalier(bilanMigration)
}
-#' handler du calcul hBilanMigrationgraph2
-#' appelle les fonctions fungraph pour faire un graphe annuel des
-#' cumuls de migration au cours du temps
-#' @param h
-#' @param ...
+#' handler for calcul hBilanMigrationgraph2
+#'
+#' Step plot over time
+#' @param h handler
+#' @param ... additional parameters
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
hbilanMigrationgraph2 = function(h,...) {
if (exists("bilanMigration",envir_stacomi)) {
@@ -248,11 +247,11 @@
}
}
-#' handler du calcul BilanMigrationstat : traitements
-#' appelle les fonctions funstat et funtable pour faire le bilan des migrations
-#' dans des fichiers csv
-#' @param h
-#' @param ...
+#' handler for summary function
+#' calls functions funstat and funtable to build summary tables in html and
+#' csv files
+#' @param h Handler
+#' @param ... Additional parameters
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
hTableBilanMigration=function(h,...) {
funout("Tableau de sortie \n")
Modified: branch0.5/stacomir/R/BilanMigrationInterAnnuelle.r
===================================================================
--- branch0.5/stacomir/R/BilanMigrationInterAnnuelle.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanMigrationInterAnnuelle.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -70,7 +70,7 @@
requete at where=paste("WHERE bjo_annee IN ",vector_to_listsql(les_annees)," AND bjo_tax_code='",tax,"' AND bjo_std_code='",std,"' AND bjo_dis_identifiant=",dic,sep="")
requete at select=paste("SELECT * FROM ",get("sch",envir=envir_stacomi),"t_bilanmigrationjournalier_bjo",sep="")
requete at order_by=" ORDER BY bjo_jour "
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
# resultat de la requete
object at data<- stacomirtools::killfactor(requete at query)
@@ -108,12 +108,12 @@
requete at baseODBC<-get("baseODBC",envir=envir_stacomi)
requete at select=stringr::str_c("DELETE from ",get("sch",envir=envir_stacomi),"t_bilanmigrationjournalier_bjo ")
requete at where=paste("WHERE bjo_annee IN (",paste(les_annees,collapse=","),") AND bjo_tax_code='",tax,"' AND bjo_std_code='",std,"' AND bjo_dis_identifiant=",dic,sep="")
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
requete=new("RequeteODBCwhere")
requete at baseODBC<-get("baseODBC",envir=envir_stacomi)
requete at select=stringr::str_c("DELETE from ",get("sch",envir=envir_stacomi),"t_bilanmigrationmensuel_bme ")
requete at where=paste("WHERE bme_annee IN (",paste(les_annees,collapse=","),") AND bme_tax_code='",tax,"' AND bme_std_code='",std,"' AND bme_dis_identifiant=",dic,sep="")
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
}
)
@@ -552,7 +552,7 @@
g <- g+scale_x_datetime(name=paste("mois"),breaks="month",minor_breaks=getvalue(new("Refperiode"),timesplit),label=date_format("%b"),
lim=as.POSIXct(c(trunc.POSIXt((min(dat[dat$valeur!=0,timesplit])),"month"),ceil.POSIXt((max(dat[dat$valeur!="0",timesplit])),"month"))))
g <- g+scale_y_continuous(name="Somme des pourcentages annuels de migration par quinzaine")
- cols <- rainbow(length(levels(dat$annee)))
+ cols <- grDevices::rainbow(length(levels(dat$annee)))
g <- g+scale_fill_manual(name="annee",values=cols)
g<-g+labs(title=paste(bilanMigrationInterAnnuelle at taxons@data$tax_nom_latin,",",bilanMigrationInterAnnuelle at stades@data$std_libelle,
", saisonnalite de la migration"))
Modified: branch0.5/stacomir/R/BilanMigrationMult.r
===================================================================
--- branch0.5/stacomir/R/BilanMigrationMult.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/BilanMigrationMult.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -271,7 +271,7 @@
" AND lot_tax_code in ",tax,
" AND lot_std_code in ",std,
" AND lot_lot_identifiant IS NULL")
- req<-connect(req)
+ req<-stacomirtools::connect(req)
bilanMigrationMult at data=req at query
# r�cuperation des coefficients si il y a des civelles dans le bilan
@@ -285,7 +285,7 @@
req at colonnefin<-"coe_date_fin"
req at and<-c("and coe_tax_code='2038'","and coe_std_code='CIV'")
req at order_by<-"order by coe_date_debut"
- req<-connect(req)
+ req<-stacomirtools::connect(req)
bilanMigrationMult at coef_conversion<-req at query
}
@@ -368,7 +368,7 @@
#----------------------------------
# bilan migration avec poids (civelles
#-----------------------------------------
- x11()
+ grDevice::X11()
fungraph_civelle(bilanMigration=bilanMigrationMult,
table=data_without_hole,
duree=bilanMigrationMult at time.sequence,
@@ -379,7 +379,7 @@
#----------------------------------
# bilan migration standard
#-----------------------------------------
- x11()
+ grDevice::X11()
fungraph(bilanMigration=bilanMigrationMult,
tableau=data_without_hole,
duree=bilanMigrationMult at time.sequence,
@@ -665,7 +665,7 @@
"dc=c(",stringr::str_c(x at dc@dc_selectionne,collapse=","),"),",
"taxons=c(",stringr::str_c(shQuote(x at taxons@data$tax_nom_latin),collapse=","),"),",
"stades=c(",stringr::str_c(shQuote(x at stades@data$std_code),collapse=","),"),",
- "datedebut=",shQuote(strftime(objext at pasDeTemps@dateDebut,format="%d/%m/%Y")),
+ "datedebut=",shQuote(strftime(x at pasDeTemps@dateDebut,format="%d/%m/%Y")),
",datefin=",shQuote(strftime(DateFin(x at pasDeTemps),format="%d/%m/%Y")),")")
# removing backslashes
funout(stringr::str_c(sortie1,sortie2))
Modified: branch0.5/stacomir/R/Bilan_carlot.r
===================================================================
--- branch0.5/stacomir/R/Bilan_carlot.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/Bilan_carlot.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -67,7 +67,7 @@
"' AND lot_std_code= '", object at stades@data$std_code,
"' AND car_par_code='", object at par@data$par_code, "'",sep="")
#object at requete@where=#defini dans la methode ODBCwheredate
- object at requete<-connect(object at requete) # appel de la methode connect de l'object ODBCWHEREDATE
+ object at requete<-stacomirtools::connect(object at requete) # appel de la methode connect de l'object ODBCWHEREDATE
object at data<-object at requete@query
funout(get("msg",envir_stacomi)$Bilan_carlot.1)
return(object)
Modified: branch0.5/stacomir/R/Bilan_poids_moyen.r
===================================================================
--- branch0.5/stacomir/R/Bilan_poids_moyen.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/Bilan_poids_moyen.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -95,7 +95,7 @@
ifelse(object at liste@listechoix=="tous", "",paste(" AND lot_effectif", object at liste@listechoix)),
" AND upper(car_methode_obtention::text) = 'MESURE'::text",
" AND car_par_code='A111'",sep="")
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
object at data<-requete at query
#CHARGEMENT DES COEFFICIENTS DE CONVERSION
object at coe@datedebut=requete at datedebut
@@ -246,7 +246,7 @@
requete=new("RequeteODBC")
requete at baseODBC=get("baseODBC",envir=envir_stacomi)
requete at sql=paste("COPY ",get("sch",envir=envir_stacomi),"tj_coefficientconversion_coe FROM '",fileout, "' USING DELIMITERS ';' WITH CSV HEADER NULL AS '';",sep="")
- requete=connect(requete) # appel de la methode connect de l'object requeteODBC
+ requete=stacomirtools::connect(requete) # appel de la methode stacomirtools::connect de l'object requeteODBC
}
}
@@ -261,12 +261,12 @@
delete(toolbarlistgraph1,group)
}
### deuxieme toobar
- aGra=gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.18,icon="lines",handler=hgra)
- aCoe=gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.19,icon="Coe",handler=hcoe,action="coe")
- aSize=gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.20,icon="gWidgetsRGtk2-bubbles",handler=hsize)
- aReg=gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.21,icon="gWidgetsRGtk2-function1",handler=hreg,action="reg")
- aExp=gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.22,icon="gWidgetsRGtk2-dataframe",handler=hexp)
- aQuit1=gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.23,icon="close", handler=hquit)
+ aGra=gWidgets::gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.18,icon="lines",handler=hgra)
+ aCoe=gWidgets::gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.19,icon="Coe",handler=hcoe,action="coe")
+ aSize=gWidgets::gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.20,icon="gWidgetsRGtk2-bubbles",handler=hsize)
+ aReg=gWidgets::gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.21,icon="gWidgetsRGtk2-function1",handler=hreg,action="reg")
+ aExp=gWidgets::gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.22,icon="gWidgetsRGtk2-dataframe",handler=hexp)
+ aQuit1=gWidgets::gaction(label=get("msg",envir_stacomi)$Bilan_poids_moyen.23,icon="close", handler=hquit)
toolbarlistgraph <- gmenu(list(gra=aGra,coe=aCoe,size=aSize))
assign("toolbarlistgraph",toolbarlistgraph,.GlobalEnv)
toolbarlistgraph1<-gmenu(list(reg=aReg,exp=aExp,Quit1=aQuit1))
Modified: branch0.5/stacomir/R/Bilan_stades_pigm.r
===================================================================
--- branch0.5/stacomir/R/Bilan_stades_pigm.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/Bilan_stades_pigm.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -95,7 +95,7 @@
" AND lot_tax_code= '2038'",
" AND lot_std_code= 'CIV'",
" AND car_par_code='1791'",sep="")
- requete<-connect(requete) # appel de la methode connect de l'object ODBCWHEREDATE
+ requete<-stacomirtools::connect(requete) # appel de la methode stacomirtools::connect de l'object ODBCWHEREDATE
funout(get("msg",envir_stacomi)$Bilan_stades_pigm.1)
object at data<-stacomirtools::killfactor(requete at query)
if (nrow (requete at query)>0) {
@@ -132,7 +132,7 @@
requete at order_by<-"ORDER BY env_stm_identifiant, env_date_debut"
tmp<-vector_to_listsql(object at stationMesure@data$stm_identifiant)
requete at and=paste(" AND env_stm_identifiant IN ",tmp )
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
funout(get("msg",envir=envir_stacomi)$BilanCondtionEnv.1)
if (nrow (requete at query)>0) {
if (unique(requete at query$env_stm_identifiant)>1) funout("vous avez choisi plusieurs stations", arret=TRUE)
@@ -438,10 +438,10 @@
VIA3= fnstade(par1=Vparm$pigment_stage[[4]],VB=FALSE,phicum=phicum,neg=FALSE,lmax=lmax)
VIA3c=cumsum(VIA3$y)/sum(VIA3$y) # surface
if(graph){
- x11()
+ grDevice::X11()
matplot(VB$x,cbind(VB$y,VIA0$y,VIA1$y,VIA2$y,VIA3$y))
- x11()
+ grDevice::X11()
matplot(VB$x,cbind(VBc,VIA0c,VIA1c,VIA2c,VIA3c))
}
#traitement a part de VB
@@ -694,7 +694,7 @@
for (k in 5:1){
polygon(x=curv[[strdates[j]]][[k]]$x,
y=nrow(tablestades)-j+1+curvsum,
- col=gray(5:1/6)[k],
+ col=grDevices::gray(5:1/6)[k],
lty=1,
lwd=1,
border=NA)
@@ -721,7 +721,7 @@
# le graphique ne supporte pas plusieurs echantillons a la même date d'ou le choix
graphics::par("mar"=c(2, 4, 3, 2)+ 0.1)
- surface(dates,tablestades,couleur=gray(5:1/6),ordre=c(1,2,3,4,5),
+ surface(dates,tablestades,couleur=grDevices::gray(5:1/6),ordre=c(1,2,3,4,5),
axe=TRUE,
xaxt="n",
ylab="% par stade",
@@ -731,7 +731,7 @@
legend( x=as.numeric(as.POSIXct(xlim[1]))+(as.numeric(as.POSIXct(xlim[2]))-
as.numeric(as.POSIXct(xlim[1])))/80,
y=0.7,legend=c("VIA3","VIA2","VIA1","VIA0","VB"),
- fill=gray(1:5/6),
+ fill=grDevices::gray(1:5/6),
bg="white",
bty="0"
)
@@ -808,14 +808,14 @@
titre3 <- glabel( text= "Titre du graphique de retrocalcul quand il est seul (graphstades = FALSE)", editable=FALSE,container=group1)
titre4 <- gtext( text= bilan_stades_pigm at labelretro, editable=TRUE,height=40,container=group1)
- aOK=gaction(label="OK",icon="gtk-ok",handler=hgettext)
- aQuit=gaction(label=get("msg",envir=envir_stacomi)$interface_Bilan_lot.9,icon="close", handler=function(h,...) dispose(wintitle))
+ aOK=gWidgets::gaction(label="OK",icon="gtk-ok",handler=hgettext)
+ aQuit=gWidgets::gaction(label=get("msg",envir=envir_stacomi)$interface_Bilan_lot.9,icon="close", handler=function(h,...) dispose(wintitle))
toolbarlist <- list(
OK=aOK,
Quit = aQuit)
- ggroupboutonsbas = ggroup(horizontal=FALSE)
+ ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
add(group1,ggroupboutonsbas)
- add(ggroupboutonsbas, gtoolbar(toolbarlist))
+ gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
}
#' An interface that calls the object to build the user interface
@@ -835,7 +835,7 @@
bilan_stades_pigm at salinite<-charge(bilan_stades_pigm at salinite,title= "Valeur de la salinite moyenne, cliquer pour editer",label="15")
quitte() # vidange de l'interface
- group = ggroup(horizontal=FALSE) # doit toujours s'appeller group
+ group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
assign("group",group,envir = .GlobalEnv)
add(ggroupboutons,group)
gl=glabel(text=get("msg",envir=envir_stacomi)$Bilan_stades_pigm.3,container=group)
@@ -859,11 +859,11 @@
affichecal=FALSE)
choix(bilan_stades_pigm at dc,objectBilan=bilan_stades_pigm,is.enabled=TRUE)
#getStockIcons(toolkit=guiToolkit())
- aCalcul=gaction(label="calcul",icon="gtk-execute",handler=funcalcbilan_stades_pigm,tooltip="Chargement des donnees")
- aSetTitle=gaction(label="title",icon="rename",handler=funtitle_bilan_stades_pigm,tooltip=get("msg",envir=envir_stacomi)$Bilan_stades_pigm.6)
- aGraph=gaction(label="graph",icon="gWidgetsRGtk2-contour",handler=hfungraphstades,tooltip="Graphique Principal")
- aGraphgg=gaction(label="graphgg",icon="gWidgetsRGtk2-bubbles",handler=fungraphgg,tooltip="Graphique supplementaire avec ggplot")
- aQuit=gaction(label=get("msg",envir=envir_stacomi)$interface_Bilan_lot.9,icon="close", handler=quitte,tooltip=get("msg",envir=envir_stacomi)$interface_Bilan_lot.9)
+ aCalcul=gWidgets::gaction(label="calcul",icon="gtk-execute",handler=funcalcbilan_stades_pigm,tooltip="Chargement des donnees")
+ aSetTitle=gWidgets::gaction(label="title",icon="rename",handler=funtitle_bilan_stades_pigm,tooltip=get("msg",envir=envir_stacomi)$Bilan_stades_pigm.6)
+ aGraph=gWidgets::gaction(label="graph",icon="gWidgetsRGtk2-contour",handler=hfungraphstades,tooltip="Graphique Principal")
+ aGraphgg=gWidgets::gaction(label="graphgg",icon="gWidgetsRGtk2-bubbles",handler=fungraphgg,tooltip="Graphique supplementaire avec ggplot")
+ aQuit=gWidgets::gaction(label=get("msg",envir=envir_stacomi)$interface_Bilan_lot.9,icon="close", handler=quitte,tooltip=get("msg",envir=envir_stacomi)$interface_Bilan_lot.9)
toolbarlist <- list(
Calcul=aCalcul,
@@ -875,15 +875,15 @@
enabled(toolbarlist[["SetTitle"]])<-FALSE
enabled(toolbarlist[["Graph"]])<-FALSE
enabled(toolbarlist[["Graphgg"]])<-FALSE
- ggroupboutonsbas = ggroup(horizontal=FALSE)
- add(ggroupboutons,ggroupboutonsbas)
- add(ggroupboutonsbas, gtoolbar(toolbarlist))
+ ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
+ gWidgets::add(ggroupboutons,ggroupboutonsbas)
+ gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
assign("ggroupboutonsbas",ggroupboutonsbas, envir=.GlobalEnv)
- addSpring(group)
+ gWidgets::addSpring(group)
#graphes=ggraphics(width=600,height=400)
#add(ggrouptotal1,graphes ) # on ajoute au groupe horizontal
#assign("graphes",graphes,envir=.GlobalEnv)
- x11()
+ grDevice::X11()
# A cet endroit sinon ouvre plusieurs fenetres pour plusieurs choses
}
Modified: branch0.5/stacomir/R/Bilan_taille.r
===================================================================
--- branch0.5/stacomir/R/Bilan_taille.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/Bilan_taille.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -112,7 +112,7 @@
}
object at requete@sql=sql
#object at requete@where=#defini dans la methode ODBCwheredate
- object at requete<-connect(object at requete) # appel de la methode connect de l'object requeteODBC
+ object at requete<-stacomirtools::connect(object at requete) # appel de la methode stacomirtools::connect de l'object requeteODBC
funout(get("msg",envir=envir_stacomi)$l1)
return(object)
})
Modified: branch0.5/stacomir/R/RefAnnee.r
===================================================================
--- branch0.5/stacomir/R/RefAnnee.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefAnnee.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -65,7 +65,7 @@
requete at sql=paste("select DISTINCT ON (year) year from( select date_part('year', ope_date_debut) as year from ",
get("sch",envir=envir_stacomi),
"t_operation_ope) as tabletemp",sep="")
- requete=connect(requete) # appel de la methode connect de l'object requeteODBC
+ requete<-stacomirtools::connect(requete) # appel de la methode connect de l'object requeteODBC
object at data<-requete at query
return(object)
})
Modified: branch0.5/stacomir/R/RefCoe.r
===================================================================
--- branch0.5/stacomir/R/RefCoe.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefCoe.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -61,7 +61,7 @@
get("sch",envir=envir_stacomi),
"tj_coefficientconversion_coe")
requete at and=" and coe_tax_code='2038' and coe_std_code='CIV' and coe_qte_code='1'"
- requete=connect(requete)
+ requete<-connect(requete)
object at data<-requete at query
return(object)
})
\ No newline at end of file
Modified: branch0.5/stacomir/R/RefDC.r
===================================================================
--- branch0.5/stacomir/R/RefDC.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefDC.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -81,7 +81,7 @@
" JOIN ref.tr_typedc_tdc ON dic_tdc_code=tdc_code",
" WHERE dft_rang=1",
" ORDER BY dis_identifiant;",sep="")
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
#funout("La requete est effectuee pour charger les Dispositifs de comptage \n")
object at data<-requete at query
return(object)
@@ -186,7 +186,7 @@
funout(get("msg",envir=envir_stacomi)$RefDC.1)
# si il existe un object fils; supprimer
# referentiel fils, celui charge par la methode charge_avec_filtre
- # ici comme on fait appel à un autre object il faut appeller le conteneur qui contient l'object
+ # ici comme on fait appel � un autre object il faut appeller le conteneur qui contient l'object
if (!is.null(objectBilan)) {
# ci dessous pas d'appel de charge_avec_filtre pour les bilanEspeces (tous les taxons)
if("RefTaxon"%in%as.character(getSlots(class(objectBilan)))){
Modified: branch0.5/stacomir/R/RefDF.r
===================================================================
--- branch0.5/stacomir/R/RefDF.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefDF.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -63,7 +63,7 @@
" JOIN ",get("sch",envir=envir_stacomi),"t_ouvrage_ouv on dif_ouv_identifiant=ouv_identifiant",
" JOIN ref.tr_typedf_tdf ON tdf_code=dft_tdf_code",
" ORDER BY dis_identifiant;",sep="")
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
object at data<-requete at query
return(object)
})
Modified: branch0.5/stacomir/R/RefMsg.r
===================================================================
--- branch0.5/stacomir/R/RefMsg.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefMsg.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -27,7 +27,7 @@
req=new("RequeteODBC")
req at baseODBC<-get("baseODBC",envir=envir_stacomi)
req at sql="SELECT * from ref.ts_messager_msr ORDER BY msr_id ASC ;"
- req=connect(req) # appel de la methode connect de l'object requeteODBC
+ req<-stacomirtools::connect(req) # appel de la methode connect de l'object requeteODBC
object at messager<-req at query
return(object)
})
@@ -48,7 +48,7 @@
" FROM ref.ts_messagerlang_mrl")
requete at where=stringr::str_c("where mrl_lang='",lang,"'")
requete at order_by="ORDER BY mrl_msr_id ASC"
- requete=connect(requete)
+ requete<-stacomirtools::connect(requete)
object at messagerlang<-requete at query
return(object)
})
Modified: branch0.5/stacomir/R/RefPoidsMoyenPeche.r
===================================================================
--- branch0.5/stacomir/R/RefPoidsMoyenPeche.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefPoidsMoyenPeche.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -53,7 +53,7 @@
date_part('month',datedebutpeche) AS mois
FROM vue_ope_lot_poids"
requete at and=""
- requete=connect(requete)
+ requete<-stacomirtools::connect(requete)
object at data<-requete at query
return(object)
})
Modified: branch0.5/stacomir/R/RefStades.r
===================================================================
--- branch0.5/stacomir/R/RefStades.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefStades.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -37,7 +37,7 @@
req=new("RequeteODBC")
req at baseODBC<-get("baseODBC",envir=envir_stacomi)
req at sql="SELECT std_code, std_libelle FROM ref.tr_stadedeveloppement_std ORDER BY std_code ;"
- req=connect(req) # appel de la methode connect de l'object requeteODBC
+ req<-stacomirtools::connect(req) # appel de la methode connect de l'object requeteODBC
object at data<-req at query
return(object)
})
@@ -61,7 +61,7 @@
requete at where=paste("where dis_identifiant in ",vector_to_listsql(dc_selectionne),sep="")
requete at and=paste("and lot_tax_code in ",vector_to_listsql(taxon_selectionne),sep="")
requete at order_by="ORDER BY std_code"
- requete=connect(requete) # appel de la methode connect de l'object requeteODBC
+ requete<-stacomirtools::connect(requete) # appel de la methode connect de l'object requeteODBC
object at data<-requete at query
if (nrow(object at data)==0) funout(get("msg",envir=envir_stacomi)$RefStades.1,arret=TRUE)
return(object)
Modified: branch0.5/stacomir/R/RefStationMesure.r
===================================================================
--- branch0.5/stacomir/R/RefStationMesure.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefStationMesure.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -50,7 +50,7 @@
" FROM ",get("sch",envir=envir_stacomi),"tj_stationmesure_stm",
" ORDER BY stm_identifiant;",sep="")
requete at silent = TRUE;
- requete<-connect(requete)
+ requete<-stacomirtools::connect(requete)
object at data<-requete at query
return(object)
}
Modified: branch0.5/stacomir/R/RefTaxon.r
===================================================================
--- branch0.5/stacomir/R/RefTaxon.r 2016-08-18 12:16:03 UTC (rev 158)
+++ branch0.5/stacomir/R/RefTaxon.r 2016-08-19 07:58:03 UTC (rev 159)
@@ -38,7 +38,7 @@
req=new("RequeteODBC")
req at baseODBC<-get("baseODBC",envir=envir_stacomi)
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/stacomir -r 159
More information about the Stacomir-commits
mailing list