[R-sig-eco] as.ltraj and fpt from AdeHabitat

Pinaud David pinaud at cebc.cnrs.fr
Mon Mar 29 08:38:13 CEST 2010


Dear Sam,
Maybe one idea is that XY units are in decimal degrees but you asked for 
radii=seq(300,1000,length=30), which seem to be in meters. As fpt() uses 
the same units as yaya coords, it seems that it returns FPT for radii 
from 300 to 1000 decimal degrees, possibly NAs... It seems that you need 
to project your data in m or km before using fpt().
Be aware also that FPT needs to be calculated every /d/ constant 
distance (not raw relocations) as mentionned in Fauchald & Tveraa 
(2003), so use redisltraj() before fpt().
HTH
David

Samantha Patrick a écrit :
> Hi
>
> I am using adehabitat to calculate first passage time (fpt) for a series of GPS locations at a specific date and time.
>
> When I use as.ltraj to workout trajectories the output I get for each data point looks like this:
>
> x                     y                 date                                     dx   dy   dist  dt    R2n    abs.angle    rel.angle
> -6.070993  51.59435  2006-06-17 15:03:04     NA  NA  NA   NA   0        NA      102        NA
>
> When I use fpt I get a series of NA for all points and I'm guessing this is to do with the NAs for dx/dy/dt from ltraj.  Does anyone know what may be causing this error?
>
> The full code is below
>
> Thanks!
>
> Sam
>
> FOR LTRAJ
> str(dddate)
> dddate<-as.character(dddate)
> str(dddate)
> tttime<-as.character(tttime)
> datetime<-paste(dddate, tttime)
> ddate <- as.POSIXct(datetime)
> xy<-data.frame (x, y)
> id<-data.frame (FPT[,5])
> xy<-data.frame (FPT[,4], FPT[,3])
> yaya<-as.ltraj(xy,ddate,id, burst, typeII = TRUE, slsp = c("remove", "missing"))
>
> FOR FPT
> fptyaya=fpt(yaya, seq(300,1000,length=30))
>
>
>
> Dr Samantha Patrick
> EU INTERREG Post Doc
> Marine Biology & Ecology Research Centre
> University of Plymouth
> Plymouth
> PL4 8AA
>
> T: 01752 584699
> M: 07740472719
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
> __________ Information from ESET Mail Security, version of virus signature database 4979 (20100328) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
>
>
>
>   

-- 
***************************************************
David PINAUD
Ingénieur de Recherche "Analyses spatiales"

Centre d'Etudes Biologiques de Chizé - CNRS UPR1934
79360 Villiers-en-Bois, France 
poste 485
Tel: +33 (0)5.49.09.35.58
Fax: +33 (0)5.49.09.65.26
http://www.cebc.cnrs.fr/

***************************************************




__________ Information from ESET Mail Security, version of virus signature database 4980 (20100328) __________

The message was checked by ESET Mail Security.
http://www.eset.com



More information about the R-sig-ecology mailing list