[R] Function to manage seconds?
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Oct 30 14:30:04 CET 2009
Try this:
> library(chron)
> times(100/(24*60*60)) # 100 seconds
[1] 00:01:40
On Fri, Oct 30, 2009 at 5:37 AM, Stefano Leonardi
<stefano.leonardi at unipr.it> wrote:
> Hi,
> I could not find a function that returns a time in hours and minutes given
> seconds as argument. I looked also in the chron package.
>
> I would need something like this:
>
> mytime(61) #61 are seconds
> [1] "00:01:01"
>
> mytime(7385) #7385 are seconds
> [1] "02:03:05"
>
> Am I missing something? or should I write it by myself?
> Thank you
> Stefano
>
>
> --
> ======================================================================
> Stefano Leonardi
> Dipartimento di Scienze Ambientali
> Universita` di Parma E-mail: stefano.leonardi at unipr.it
> Viale Usberti 11/A Phone : +39-0521-905659
> 43100 PARMA (Italy) Fax : +39-0521-905402
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list