Jan Grimsrud Davidsen
2006-Jul-04 13:31 UTC
[R] change a specific time into seconds since midnight
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]]
Gabor Grothendieck
2006-Jul-04 13:47 UTC
[R] change a specific time into seconds since midnight
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
>
>