Dear All,
I would like to create an object of class "ltraj" for all GPS
positions (id=Bird) with time, but I always get the following error
message:
Error in as.ltraj(xy, TB$gmt, id, burst, typeII = TRUE, slsp =
c("remove", :
non unique dates for a given burst
Do I need to create a burst? Could anyone tell me what the exact
difference between "id" and "burst" in as.ltraj is?
When a create a ltraj for only one individual (eg. bird 18) it works
fine: tr18<-as.ltraj(xy[TB$Bird=="18",], date=TB$gmt[TB$Bird=="18"],
id="18")
But it doesn't work for all animals...
My script so far:
library(adehabitat)
library(ade4)
library(gpclib)
library(trip)
library(maps)
library(mapdata)
library(fields)
TB<-as.data.frame(read.table("GPS_2009_2010R.csv",header=T,sep=','))
xy<-TB[,c("LON","LAT")]
id<-TB[,c("Bird")]
### Conversion of the date to the format POSIX
gmt<-(TB$DateTime)
TB$gmt<-as.POSIXct(strptime(gmt, "%d.%m.%Y %H:%M:%S", tz="GMT"))
### Creation of the object of class "ltraj" for GPS positions with time
tr<-as.ltraj(xy, TB$gmt, id, typeII=TRUE, slsp = c("remove", "missing"))
My csv.file contains the following columns:
Bird (ID)
DateTime (date and time in one column)
LON (longitude)
LAT (latitude
Thank you very much.
Best regards,
Julia
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov