Description Usage Arguments Details Value See Also Examples

Density, distribution function, quantile function for the distances between entities at the given time(s), using the Brownian bridge movement model. Distance between entities and whether encounters occur in the linear movement model.

1 2 3 4 5 6 7 8 |

`d` |
Vector of distances |

`p` |
Vector of probabilities |

`tr` |
The trajectory object |

`time` |
Vector of times |

`encounterIntervals`

accepts only a single distance.

`distance`

returns a three dimensional array indexed by two IDs and the time,
each value representing the distance in the linear movement model between these two IDs at that time.

`encounter`

returns whether an encounter occurs for each value of `d`

and for each of the requested times. The value is computed between each pair of IDs in the trajectory.
This means that the result is a 4 dimensional array, indexed by the IDs involved,
the value of `d`

and the time.

`encounterIntervals`

computes the time intervals in which there is an encounter
between each pair of IDs. In the linear model this can be solved analytically,
which is often faster than requesting whether an encounter occurs for many different
times.

`ddistance`

computes the density, `pdistance`

the distribution function and
`qdistance`

evaluates the quantile function for the requested parameters. `pdistance`

is equivalent to the probability that an encounter occurs, given a threshold distance.

The functions return the requested values for each value of the first parameter
(`d`

or `p`

) and for each of the requested times. The value is computed
between each pair of IDs in the trajectory.

This means that the result is a 4 dimensional array, indexed by the IDs involved,
the value of `d`

or `p`

and the time.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
data("vervet_monkeys", package="moveBB")
## Compute the distance at two distinct times
#distance(monkey.tr, as.POSIXct(c("2011-01-18 15:15:15", "2011-01-19 16:30:00")))
## See whether an encounter occurs at the 50m or 100m thesholds
#encounter(c(10, 100), monkey.tr, as.POSIXct(c("2011-01-18 15:15:15", "2011-01-19 16:30:00")))
## Compute when there are encounters
#ei <- encounterIntervals(100, monkey.tr)
#ei[["BD","NH"]]
## Compute the 5th and 95th percentile of the distance at two distinct times
#qdistance(c(0.05, 0.95), monkey.tr, as.POSIXct(c("2011-01-18 15:15:15", "2011-01-19 16:30:00")))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.