I have a vector of decimal numbers, which represent \'decimal day\', the fraction of a day. I want to convert it into HH:MM format using R.
For example, the number
One option with data.table:
> library(data.table)
> structure(as.integer(0.4305556*60*60*24), class="ITime")
[1] "10:20:00"
We convert from day fraction to seconds since midnight; coerce to integer; and apply ITime class. (ITime works with integer-stored seconds since midnight.)
Other resources: