I have a question about subtracting columns of time from R. I have three columns that I need to subtract from one another to get a total amount of observation time. I need to do
(TIMEEND-TIMESTART)-TIMEOUT
.
When I use OBSTIME <- difftime(pipers$TIMEEND, pipers$TIMESTART, units = "hours")
, I get the first part, but how do I subtract the TIMEOUT
from this. Or is there a way of subtraction all three columns at the same time? Is this even the correct format to be doing this in?
Thank in advance for the help!
Michelle
$ TIMESTART : POSIXct, format: "2013-10-28 10:30:00" "2013-10-28 14:50:00" "2013-10-28 14:50:00" ...
$ TIMEEND : POSIXct, format: "2013-10-28 12:30:00" "2013-10-28 16:50:00" "2013-10-28 16:50:00" ...
$ TIMEOUT : POSIXct, format: "2013-10-28 00:04:00" "2013-10-28 00:10:00" "2013-10-28 00:10:00" ..