[Stacomir-commits] r467 - stacomir0.5.3/pkg/stacomir/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 23 18:44:10 CET 2017


Author: briand
Date: 2017-12-23 18:44:10 +0100 (Sat, 23 Dec 2017)
New Revision: 467

Modified:
   stacomir0.5.3/pkg/stacomir/R/ref_horodate.R
   stacomir0.5.3/pkg/stacomir/R/ref_timestep.R
   stacomir0.5.3/pkg/stacomir/R/report_ge_weight.R
   stacomir0.5.3/pkg/stacomir/R/report_mig_env.R
Log:
Hmisc modifications

Modified: stacomir0.5.3/pkg/stacomir/R/ref_horodate.R
===================================================================
--- stacomir0.5.3/pkg/stacomir/R/ref_horodate.R	2017-12-23 16:51:52 UTC (rev 466)
+++ stacomir0.5.3/pkg/stacomir/R/ref_horodate.R	2017-12-23 17:44:10 UTC (rev 467)
@@ -24,7 +24,7 @@
 setClass(Class="ref_horodate",representation=
 		representation(horodate="POSIXt"),
 	validity=validity_ref_horodate,
-	prototype=prototype(horodate=Hmisc::round.POSIXt(Sys.time(),"years")))
+	prototype=prototype(horodate=Hmisc::roundPOSIXt(Sys.time(),"years")))
 # date= new("Horodate")
 #retourne la date en format character
 setGeneric("getref_horodate",def=function(object,...) standardGeneric("getref_horodate"))

Modified: stacomir0.5.3/pkg/stacomir/R/ref_timestep.R
===================================================================
--- stacomir0.5.3/pkg/stacomir/R/ref_timestep.R	2017-12-23 16:51:52 UTC (rev 466)
+++ stacomir0.5.3/pkg/stacomir/R/ref_timestep.R	2017-12-23 17:44:10 UTC (rev 467)
@@ -166,7 +166,7 @@
 	  current_start_date=object at dateDebut+ object at step_duration*object at nocurrent_step
 	  # bug cht heure
 	  if (object at step_duration==86400) {
-		current_start_date=Hmisc::round.POSIXt(current_start_date,"days")
+		current_start_date=Hmisc::roundPOSIXt(current_start_date,"days")
 	  }			
 	  return(current_start_date)
 	})
@@ -182,7 +182,7 @@
 setMethod("current_end_date",signature=signature("ref_timestep"),definition=function(object){
 	  the_current_end_date=object at dateDebut+ object at step_duration*(object at nocurrent_step+as.integer(1))
 	  if (object at step_duration==86400) {
-		the_current_end_date=Hmisc::round.POSIXt(the_current_end_date,"days")
+		the_current_end_date=Hmisc::roundPOSIXt(the_current_end_date,"days")
 	  }
 	  return(the_current_end_date)
 	})

Modified: stacomir0.5.3/pkg/stacomir/R/report_ge_weight.R
===================================================================
--- stacomir0.5.3/pkg/stacomir/R/report_ge_weight.R	2017-12-23 16:51:52 UTC (rev 466)
+++ stacomir0.5.3/pkg/stacomir/R/report_ge_weight.R	2017-12-23 17:44:10 UTC (rev 467)
@@ -513,8 +513,8 @@
 			"coe_tax_code"='2038',
 			"coe_std_code"='CIV',
 			"coe_qte_code"=1,
-			"coe_date_debut"=Hmisc::round.POSIXt(predata$date,digits="days"),
-			"coe_date_fin"=Hmisc::round.POSIXt(predata$date,digits="days")+as.difftime(1,units="days"),
+			"coe_date_debut"=Hmisc::roundPOSIXt(predata$date,digits="days"),
+			"coe_date_fin"=Hmisc::roundPOSIXt(predata$date,digits="days")+as.difftime(1,units="days"),
 			"coe_valeur_coefficient"=1/predata$pred_weight,
 			"coe_commentaires"=com)
 		# will write only if the database is present

Modified: stacomir0.5.3/pkg/stacomir/R/report_mig_env.R
===================================================================
--- stacomir0.5.3/pkg/stacomir/R/report_mig_env.R	2017-12-23 16:51:52 UTC (rev 466)
+++ stacomir0.5.3/pkg/stacomir/R/report_mig_env.R	2017-12-23 17:44:10 UTC (rev 467)
@@ -203,7 +203,7 @@
 			stations[stations$stm_identifiant==unique(tableauCE$env_stm_identifiant)[i],"stm_libelle"]
 	  }
 	  # the data can be in the POSIXct format, we need to round them
-	  tableauCE$date<-as.POSIXct(Hmisc::round.POSIXt(tableauCE$env_date_debut,digits="days"))
+	  tableauCE$date<-as.POSIXct(Hmisc::roundPOSIXt(tableauCE$env_date_debut,digits="days"))
 	  qualitative<-!is.na(tableauCE$env_val_identifiant)
 	  tableauCEquan<-tableauCE[!qualitative,]
 	  tableauCEqual<-tableauCE[qualitative,]



More information about the Stacomir-commits mailing list