Skip to content
Prev 593 / 7419 Next

as.ltraj in adehabitat

Hello,
many thanks for replying ! In the example there are 4 observations for 18/06/2006, at 4 different times, 2 observations for 05/09/2006 at two different times andso on. My data are in excel files, one per individual.
I use this code to read in and prepare the example data set:

library(PBSmapping)
library(adehabitat)
track_1646=read.table("AllChange_1646R.txt", sep="\t", header=TRUE)
attr(track_1646, "projection") <- c("LL")
track_1646.utm <- convUL(track_1646)
track_1646 <- track_1646.utm
#colnames(track_1646) <- c("X","Y","date","id","burst","Time","ID","VR2number")
id <- as.character(track_1646$id)
burst <- as.character(track_1646$burst)
date <- as.POSIXct(strptime(as.character(track_1646$date),"%d/%m/%Y"))
as.ltraj(track_1646, date, id, burst,typeII = TRUE, slsp = c("remove", "missing"))

The last line yields the error message. I am not really sure about the burst argument, and I do not know why as.traj () needs it. Can you shed light on this ?
Many thanks for your time. 
Juliane