I have been using difftime to change the time points in my data from POSIXct format (%Y-%m-%d %H:%M:%S) to relative time in hours(starting at 0). This works fine, except I have some very few time points that are registered at exactly midnight (00:00:00). Then difftime computes the difference to the next time point as 24 hours. Is there a way around this?
In the context of my data, I could simply change those time point to 00:01:00 and it would be okay since I am working on the hour time-scale, but I would first try to find a solution.
From the description, it sounds like
hmsmight be useful here:Created on 2024-02-06 with reprex v2.0.2