I'm trying to use adehabitatLT analyze animal movements. However, I'm having issues with creating a ltraj object in R. I have followed the as.ltraj() example in the documentation and I'm getting this error: non unique dates for a given burst. Here is my code:

dist_data <- read.csv("disturbance.csv")

dist_data <- na.omit(dist_data)

GPSTime <- base::as.POSIXct(base::strptime(dist_data$UTC_datetime, format = "%m/%d/%Y %H:%M", tz = "UTC"))

dist_data_ltraj <- as.ltraj(xy = dist_data[,c("Longitude", "Latitude")],
                            date = GPSTime, id = dist_data$device_id)

Again, this is the error that I keep receiving:

Error in as.ltraj(xy = dist_data[, c("Longitude", "Latitude")], date = GPSTime,: 
non unique dates for a given burst

I've trying reformatting my dates but continue to have issues. I would be so grateful for any thoughts or feedback.

  • Does duplicated(GPSTime) show multiple observations at a given time point? – JepsonNomad Sep 3 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.