[R] Formating time in R

Cacique Samurai caciquesamurai at gmail.com
Mon Oct 26 16:35:58 CET 2015


Hello R-Helpers!

I have a vector of times of events that time is fraction of 1, because it
was calculated in excel. Are there some way to format a period greater than
24h in a format like excel [h]:mm:ss?

Exemple:

test = c(1.424708, 0.028674)

> chron (times. = test [2], format = "h:m:S")
[1] 00:41:17

> chron (times. = test, format = "h:m:S")
Time in days:
[1] 1.424708 0.028674

I need an output like:

*34:11:35* 0:41:17

Thanks in advanced,

Raoni
-- 
Raoni Rosa Rodrigues
Research Associate of Fish Transposition Center CTPeixes
Universidade Federal de Minas Gerais - UFMG
Brasil
rodrigues.raoni at gmail.com

	[[alternative HTML version deleted]]



More information about the R-help mailing list