[R-sig-eco] Multiple locations with the same coordinates and ltraj

Christina Vedel-Smith cvs at nathist.dk
Wed May 24 17:22:14 CEST 2017


Hi everyone

I hope one of you can help me because I am stuck :S

I have a data set where I have several locations where the individuals (mice) have stayed exactly in the same spot.

My locations are recorded with approximately 60 mins intervals.

So every location have a unique timestamp but can have the same xy coordinates.

If I remove all the locations with the same coordinates I have no problem running my code but the actual biological information is degraded.

I have attached the file with the data.

My code is:
> library(ctmm)
> library(adehabitatHR)
> workdir="C:\\Users\\Christina\\OneDrive\\Dokumenter\\Telemetri\\Input"
> setwd(workdir)
> microtus <- read.csv2("MiceIn_2008_Data.csv")
> info <- list(projection="+proj=utm+zone=?? + ellps=WGS84 +datum=WGS84",timezone="GMT")
> microtus$timestamp <- as.POSIXct(microtus$Date_Time,tz=info$timezone,"%d-%m-%Y %H:%M")
> microtus$t <- as.numeric(microtus$timestamp)
> Locs_traj = as.ltraj(xy=microtus[ ,3:4], date=microtus$timestamp, id=microtus$ID)

Error in as.ltraj(xy = microtus[, 3:4], date = microtus$timestamp, id = microtus$ID) :
  non unique dates for a given burst

Thank you so much
/Christina


More information about the R-sig-ecology mailing list