speedDistribution: Compute average speed at each location

Description Usage Arguments Value See Also Examples

Description

For each grid cell, this function computes the average speed over time conditioned on the trajectory being in that cell.

Usage

1
speedDistribution(tr, grid = NULL, timestepSize = 60, time.scale = timestepSize, xc = NULL, yc = NULL, grid.dim = 100, grid.pad = 0.2)

Arguments

tr

The trajectory for which to compute the UD

grid

a grid of class asc

timestepSize

The difference between consecutive time steps, in seconds.

time.scale

The length of the intervals over which to compute the speed.

xc

The x coordinates of the vertical grid lines

yc

The y coordinates of the horizontal grid lines

grid.dim

If all of grid, xc and yc are omitted, this specifies the dimension of the shortest axis of the grid used.

grid.pad

If the grid is automatically generated, its range is the range of the relocations extended grid.pad times the length of the range on each side.

Value

Returns a list, indexed by the IDs in tr. If grid is given, each element of the result list is an object of class asc, representing the same grid. Otherwise, each element of the list is a matrix, indexed by the coordinates specified in xc and yc, or by the coordinates computed from tr.

See Also

velocity, speed, bbtraj

Examples

1
2
3
4
5
data("vervet_monkeys", package="moveBB")

## Compute the speed distribution and plot the result
#sd <- speedDistribution(monkey.tr)
#image(sd[[1]]) # Plot only the distribution of the first entity

moveBB documentation built on May 2, 2019, 5:50 p.m.