Share

10.15 Subset GPS locations by a date range

#First make original date field (GPS.Fix.Time) a Date
muleys$Date <- as.Date(muleys$GPS.Fix.Time, "%Y.%m.%d")

#NOTE: The date in GPS.Fix.Time is formatted 2011.12.31 so formats must match the date format in line of code above.

locs2012 <- subset(muleys, Date > "2011-12-31" & Date < "2012-12-31")