speed: Get statistics about speed

Description Usage Arguments Details Value See Also Examples

Description

Get speed over any time intervals in the linear model. Get density, distribution function, quantiles and expected value in BBMM.

Usage

1
2
3
4
5
6
speed(tr, time, time.scale = NA)
mu.speed(tr, time, time.scale=NA)

pspeed(v, tr, time, time.scale=NA)
dspeed(v, tr, time, time.scale=NA)
qspeed(p, tr, time, time.scale=NA)

Arguments

v

Vector of speeds

p

Vector of probabilities

tr

The trajectory object

time

Vector of times

time.scale

The length of the intervals over which to report the speed or direction

Details

The speed at a time t is defined as the absolute value of the velocity over the time interval [t-time.scale/2, t+time.scale/2].

Value

speed and mu.speed return a matrix indexed by the ID in the trajectory and time. dspeed, pspeed and qspeed return an array indexed by ID, the requested speed or probability and time.

See Also

velocity, bbtraj

Examples

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

## Compute the (linear model) speed over two half-hour intervals
#v <- speed(monkey.tr, as.POSIXct(c("2011-01-18 15:15:15", "2011-01-19 16:30:00")), 1800)
#v

## Compute the density of four speeds over the same time intervals
#dspeed(v, monkey.tr, as.POSIXct(c("2011-01-18 15:15:15", "2011-01-19 16:30:00")), 1800)

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

Related to speed in moveBB...