[R] time mathematics

Bjørn-Helge Mevik b@h@mevik @ending from u@it@uio@no
Tue Nov 20 11:25:39 CET 2018


Well, this is not an elegant (or robust) solution, but this would work
for the example you give, at least:

starttime <- as.POSIXct("2018-11-20 23:01:18") # Just pick a random date
format(starttime + c(0:4), format = "%T")

There are probably better ways. :)

-- 
Regards,
Bjørn-Helge Mevik

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20181120/197b5959/attachment-0001.sig>


More information about the R-help mailing list