extractMoves: Simulated Movements

Description Usage Arguments Details Value See Also Examples

Description

Extract movements from a previously simulated multi-session population.

Usage

1
extractMoves(pop, plotn = NULL, add = FALSE, collapse = TRUE, maxradius = Inf, ...)

Arguments

pop

popn object from sim.popn

plotn

integer maximum number of instances to plot at each session

add

logical for whether to add to existing plot

collapse

logical; if TRUE plots for sessions 2, 3,... are added to the first

maxradius

numeric radius for selecting subset of initial locations

...

arguments passed to arrows (length = 0 to suppress arrows)

Details

This function is mostly used to check the movement simulations.

Moves are constrained by the edge (argument ‘edgemethod’ of sim.popn). ‘maxradius’ may be set to restrict the extraction to the subset of animals initially near the centroid of the arena in each session.

Value

List of data frames, one for each session but the last (columns 'x1','y1','x2','y2','d').

See Also

turnover, sim.popn

Examples

1
2
3
4
5
6
set.seed(12345)
pop3 <- sim.popn(D = 2, core = make.grid(), buffer = 200, nsessions = 3, 
    details = list(lambda = 1.0, movemodel = 'BVE', move.a = 50, 
    edgemethod = 'stop'))
m <- extractMoves(pop3, plotn = 10, length = 0.1) # shorten arrow heads
mean(unlist(sapply(m, '[', 'd')))                 # less than nominal

secr documentation built on July 12, 2021, 9:07 a.m.