[R] sort time

Ben Bolker bolker at ufl.edu
Mon Oct 8 17:29:56 CEST 2007




Samuel Okoye wrote:
> 
> Hello, I have got the following problem:
> [snip]
>  
> 

Assuming that these are in month/day/year format (which I conclude from
your sorted values):

times <- c("02.07.2007", "03.07.2007","03.09.2007",
"04.07.2007","05.07.2007")
times2 <- as.Date(times,format="%m.%d.%Y")
sort(times2)

  Ben Bolker

-- 
View this message in context: http://www.nabble.com/sort-time-tf4588604.html#a13098424
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list