I presume your date/time values are of class POSIXct and do include
times (if they don't adehabitat will think multiple observations on a
given day are duplicates)? If that's all good find out which POSIXct
values are repeated:
dupz = which(duplicated(mydates))
mydates = mydates[-dupz]
Tyler
On 2010-08-14, at 8:49, Julia Sommerfeld <[email protected]> wrote:
Hello,
Thank you for yoir fast reply. I have indeed overlapping dates, i.e.
several birds have the same start and end date. But I'm not sure
how to overcome this problem? Couldn't find anything in adehabitat.
Cheers
Julia
On 14/08/2010, at 2:38 , Tyler Dean Rudolph wrote:
your problem seems to be that you have duplicate (i.e. more than
one identical) dates for a given burst. I believe there are
arguments in adehabitat to check for this; if not you will need to
verify this first.
On 2010-08-14, at 8:16, Julia Sommerfeld <[email protected]> wrote:
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
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
Julia Sommerfeld - PhD Candidate
Institute for Marine and Antarctic Studies
University of Tasmania
Private Bag 129, Hobart
TAS 7001
Phone: +61 458 247 348
Email: [email protected]
[email protected]
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov