[R] change a specific time into seconds since midnight

Gabor Grothendieck ggrothendieck at gmail.com
Tue Jul 4 15:47:00 CEST 2006


Try this:

library(chron)
24 * 60 * 60 * times("10:49:48")


On 7/4/06, Jan Grimsrud Davidsen <Jan.Davidsen at nfh.uit.no> wrote:
> Does anyone know a code which can transfer a column with time into seconds since midnight?
>
> Example: (10:49:48) --> 38988
>
> Thanks :-)
>
>
>
> Jan Grimsrud Davidsen
>
> --------------------------------------------------------------------------------------
>
> PhD student
>
> Norwegian College of Fishery Science
> University of Tromsø
>
>
>
>
>        [[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