[R-sig-Geo] Trouble with first passage time analysis

zlong xanthro_m at hotmail.com
Tue Oct 30 02:49:39 CET 2012


Hey all,

I posted this question a few days ago on a different forum, and was directed
here. Hopefully someone will be able to help me out. I've managed to figure
out just about everything I need, I'm just left with one unresolved issue.
I'm fine up to the point of creating the ltraj object from a dataset.

/test<-read.table("~/Desktop/R_Directory/test.txt",header=TRUE)
attach(test)
library(adehabitatLT)
xy<-test[,c("x","y")]
date1<-as.character(date)
date<-as.POSIXct(date1)
fit1<-as.ltraj(xy,date,id=test$name,burst=name,typeII=TRUE)/

from here things start to get fuzzy...


Instead of following the basic expression,

/fpt(lt, radii, units = c("seconds", "hours", "days"))/


the sample code on the tutorial expressed fpt as,

/fpt(lt, seq(300,1000, length=30))/


But as far as I can tell this code does not set a specific radius distance
(e.g., 100 m), but rather defines how many radii are to be distributed
across the dataset.

The example code returns values for 30 radii (i.e., "length=30").

/data(puechcirc)
i <- fpt(puechcirc, seq(300,1000, length=30))
plot(i, scale = 500, warn = FALSE)/


Modifying the code, I calculated values for 5 radii using a subsample of my
data (attached below).

/i <- fpt(fit1, seq(length=5), units="days")
plot(i, scale = 5, warn = FALSE)
i/
[[1]]
          r1         r2         r3         r4       r5
1         NA         NA               NA               NA       NA
2   80403.66     NA               NA               NA       NA
3   58711.45     NA               NA               NA       NA
4   5325.09   137121.1         NA               NA       NA
5   25695.41   432542.8   587729.9   742917.0 2061795
6   32629.12   394459.5   553960.4   713461.3 2050644
7   13175.66   489781.9   649159.8 1441978.8 2088730
8   35531.17 1362903.1 1521188.3 1702321.9 2107085
9   60181.97 1348559.8 1515091.3 1698974.1 2124975
10 106913.46 1323955.4 1504503.8 1700214.7 2151971
11   94222.94 1334576.0 1513000.0 1711400.7 2145693
12   66315.86 1329840.1 1488550.8 1647261.5 2089818
13   68114.22 1352723.6 1512442.1 1690046.2 2098154
14   20141.44 1339237.6 1504857.4 1677927.2 2123560
15   5553.17   142994.1         NA              NA       NA
16 231598.68       NA             NA              NA       NA
17 231598.68       NA             NA              NA       NA
18         NA          NA             NA              NA       NA

5_radii.pdf
<http://r-sig-geo.2731867.n2.nabble.com/file/n7581501/5_radii.pdf>  
Fig. 1. fpt(fit1, seq(length=5), units="days")

Is there a way to manually select radius distances (in meters) rather than
specifying how many radii you’d like distributed across the dataset? Or am I
mistaken, and I simply have to estimate radius distances from the spatial
extent of my data (i.e., if an animal traveled 5 km and I had 5 radii, they
are spaced 1000 m apart). 

I have attached the small dataset I was using to test out the code in case
you'd like to play around with the data.
test.txt <http://r-sig-geo.2731867.n2.nabble.com/file/n7581501/test.txt>  
As a point of interest, the data represent radio-telemetry points for a
western toad. 

Any assistance would be greatly appreciated



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Trouble-with-first-passage-time-analysis-tp7581501.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list