[Stacomir-commits] r466 - in pkg/stacomir: . R inst/config

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 23 17:51:52 CET 2017


Author: briand
Date: 2017-12-23 17:51:52 +0100 (Sat, 23 Dec 2017)
New Revision: 466

Modified:
   pkg/stacomir/DESCRIPTION
   pkg/stacomir/R/ref_horodate.R
   pkg/stacomir/R/ref_timestep.R
   pkg/stacomir/R/report_ge_weight.R
   pkg/stacomir/R/report_mig_env.R
   pkg/stacomir/inst/config/generate_Roxygen2.R
Log:
Fixing compatibility problem with Hmisc

Modified: pkg/stacomir/DESCRIPTION
===================================================================
--- pkg/stacomir/DESCRIPTION	2017-11-16 13:41:24 UTC (rev 465)
+++ pkg/stacomir/DESCRIPTION	2017-12-23 16:51:52 UTC (rev 466)
@@ -1,6 +1,6 @@
 Package: stacomiR
-Version: 0.5.3.9000
-Date: 2017-09-01
+Version: 0.5.3.1
+Date: 2017-12-23
 Title: Fish Migration Monitoring
 Authors at R: c(person("Cedric", "Briand", role = c("aut", "cre"), email = "cedric.briand00 at gmail.com"),
 	      person("Marion", "Legrand", role = "aut", email="tableau-salt-loire at logrami.fr"),
@@ -8,7 +8,7 @@
 Description: Graphical outputs and treatment for a database of fish pass
     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 fish pass monitoring. Version 0.5.3.9000 is available in French and
+    data obtained by fish pass monitoring. Version 0.5.3.1 is available in French and
     English. See <http://stacomir.r-forge.r-project.org/> for more information on
     'STACOMI'.
 License: GPL (>= 2)

Modified: pkg/stacomir/R/ref_horodate.R
===================================================================
--- pkg/stacomir/R/ref_horodate.R	2017-11-16 13:41:24 UTC (rev 465)
+++ pkg/stacomir/R/ref_horodate.R	2017-12-23 16:51:52 UTC (rev 466)
@@ -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: pkg/stacomir/R/ref_timestep.R
===================================================================
--- pkg/stacomir/R/ref_timestep.R	2017-11-16 13:41:24 UTC (rev 465)
+++ pkg/stacomir/R/ref_timestep.R	2017-12-23 16:51:52 UTC (rev 466)
@@ -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: pkg/stacomir/R/report_ge_weight.R
===================================================================
--- pkg/stacomir/R/report_ge_weight.R	2017-11-16 13:41:24 UTC (rev 465)
+++ pkg/stacomir/R/report_ge_weight.R	2017-12-23 16:51:52 UTC (rev 466)
@@ -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: pkg/stacomir/R/report_mig_env.R
===================================================================
--- pkg/stacomir/R/report_mig_env.R	2017-11-16 13:41:24 UTC (rev 465)
+++ pkg/stacomir/R/report_mig_env.R	2017-12-23 16:51:52 UTC (rev 466)
@@ -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,]

Modified: pkg/stacomir/inst/config/generate_Roxygen2.R
===================================================================
--- pkg/stacomir/inst/config/generate_Roxygen2.R	2017-11-16 13:41:24 UTC (rev 465)
+++ pkg/stacomir/inst/config/generate_Roxygen2.R	2017-12-23 16:51:52 UTC (rev 466)
@@ -47,4 +47,6 @@
 #setwd("C:/workspace/stacomir/pkg")
 #Rd2roxygen(pkg="stacomirtools")
 
-    
\ No newline at end of file
+# TODO sinew package check when building functions
+# https://www.r-bloggers.com/automating-roxygen2-package-documentation/
+# makeOxygen(myfun)   
\ No newline at end of file



More information about the Stacomir-commits mailing list