[Stacomir-commits] r297 - pkg/stacomir/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 13 09:02:49 CET 2017
Author: briand
Date: 2017-03-13 09:02:49 +0100 (Mon, 13 Mar 2017)
New Revision: 297
Modified:
pkg/stacomir/R/Bilan_poids_moyen.r
Log:
changing error to fileout
Modified: pkg/stacomir/R/Bilan_poids_moyen.r
===================================================================
--- pkg/stacomir/R/Bilan_poids_moyen.r 2017-02-27 15:45:11 UTC (rev 296)
+++ pkg/stacomir/R/Bilan_poids_moyen.r 2017-03-13 08:02:49 UTC (rev 297)
@@ -494,13 +494,15 @@
"coe_date_fin"=Hmisc::round.POSIXt(predata$date,digits="days")+as.difftime(1,units="days"),
"coe_valeur_coefficient"=1/predata$pred_weight,
"coe_commentaires"=com)
- fileout= paste("C:/base/","import_coe",bilPM at anneedebut@annee_selectionnee,bilPM at anneefin@annee_selectionnee,".csv",sep="")
- #attention ecrit dans C:/base....
+ # will write only if the database is present
+ if (get("database_expected",envir_stacomi)){
+ fileout= paste(get("datawd",envir=envir_stacomi),"import_coe",bilPM at anneedebut@annee_selectionnee,bilPM at anneefin@annee_selectionnee,".csv",sep="")
utils::write.table(import_coe,file=fileout, row.names = FALSE,sep=";")
+ funout(paste(gettextf("data directory :%s",fileout,domain="R-stacomiR")))
+ }
assign("import_coe",import_coe,envir=envir_stacomi)
funout(gettext("To obtain the table, type : import_coe=get(import_coe\",envir_stacomi",domain="R-stacomiR"))
- funout(paste(gettextf("data directory :%s",fileout,domain="R-stacomiR")))
- bilPM at calcdata[["import_coe"]]<-import_coe
+ bilPM at calcdata[["import_coe"]]<-import_coe
})
More information about the Stacomir-commits
mailing list