2 Oct 05:43
simm.levy in adehabitat
Hi-
I'm trying to use the simm.levy function in the package adehabitat(vers.
1.7, R version 2.7.2) to simulate Levy walks of an ltraj object (time
stamped GPS coordinates of a possum). I'm having trouble with using the id
and burst of a given animal as the id and burst arguments of the simm.levy
function. Below is a summary of my ltraj object and I have (object is named
'p.sett').
> p.sett
*********** List of class ltraj ***********
Type of the traject: Type II (time recorded)
Regular traject. Time lag between two locs: 900 seconds
Characteristics of the bursts:
id burst nb.reloc NAs date.begin date.end
1 p1801 1988038937 6 1 2006-08-09 09:00:00 2006-08-09 10:15:00
2 p1801 1988038938 3 0 2006-08-10 02:00:00 2006-08-10 02:30:00
3 p1801 1988038939 9 1 2006-08-11 03:00:00 2006-08-11 05:00:00
4 p1801 1988038940 17 5 2006-08-12 02:00:00 2006-08-12 06:00:00
5 p1801 1988038941 23 10 2006-08-13 02:00:00 2006-08-13 07:30:00
...
237 p1801 1988039304 126 110 2007-08-10 01:15:00 2007-08-11 08:30:00
238 p1801 1988039305 1 0 2007-08-11 02:45:00 2007-08-11 02:45:00
Ideally what I'd like to do is define the simulation using the
characteristics of a given 'burst' from my ltraj object. I'd appreciate some
pointers on the syntax of calling the simulation using the the
characteristics of each row in p.sett. Sample code follows:
> sim.levy<-simm.levy(date=1:126, id=p.sett$id=="1801",
burst=p.sett$burst=="1988039304", x0=c(174.48255,-36.819058), typeII=T)
(Continue reading)
RSS Feed