Here is a subset of my data:
Fr Sig Code NumDet Date.Time Aerial
62 150102 102 15 195 2012-09-14 18:28:00 1
63 150102 102 15 189 2012-09-14 18:32:00 1
64 150102 106 15 213 2012-09-14 18:36:00 1
65 150102 102 15 152 2012-09-14 18:40:00 1
66 150102 105 15 190 2012-09-14 18:46:00 1
67 150102 97 15 4 2012-09-14 18:51:00 2
I am trying to calculate time between first detection on Aerial 1 and first detection on Aerial 2. Hence in this data set it would be 23mins
I have tried variations of difftime
but can't seem to select specific times based on the Aerial number.
I have tried:
a <- difftime(table$Date.Time[2:length(table$Aerial == "1")],
table$Date.Time[2:length(table$Aerial == "2")])
but it's not even close.