[R] timediff

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Tue Jun 20 13:13:26 CEST 2006


On Tue, 20 Jun 2006 12:38:11 +0200 COMTE Guillaume wrote:

>  
> 
> Hello,
> 
>  
> 
> I've got 2 dates like these :
> 
>  
> 
> "2006-02-08 17:12:55"
> 
> "2006-02-08 17:15:26"
> 
>  
> 
>  
> 
> I wish to get the middle of these two date :

There is a mean method for "POSIXct" objects:

  x <- as.POSIXct(c("2006-02-08 17:12:55", "2006-02-08 17:15:26"))
  mean(x)

Best,
Z

>  
> 
> "2006-02-08 17 :14 :10"
> 
>  
> 
> Is there is a function in R to do that ?
> 
>  
> 
> Thks all
> 
> guillaume
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



More information about the R-help mailing list