A little "gottcha" which I think is worth pointing out ...
In R 3.1.2 for Windows 64 bit, I get the following results for a Dirk example
> ISOdatetime(2013,8,22,0,0,0) + 34200577/1e3 [1] "2013-08-22 09:30:00 BST"
Pay attention to the absence of fractional seconds. This is due to the setting of the "digits.secs" parameter
> getOption("digits.secs") NULL
Setting this option as follows gives the expected result:
> options(digits.secs=3) > ISOdatetime(2013,8,22,0,0,0) + 34200577/1e3 [1] "2013-08-22 09:30:00.576 BST"
As you can guess, this is due to the formatting of the output, and not to the actual values that we get from our date arithmetic. See ?strptime and ?strptime for documentation on this.
source share