Multiple locations with the same coordinates and ltraj

classic Classic list List threaded Threaded
1 message Options
Open this post in threaded view
Report Content as Inappropriate

Multiple locations with the same coordinates and ltraj

Christina Vedel-Smith
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
R-sig-ecology mailing list
[hidden email]