cu_crw_sample: Batch CRW Posterior Path Simulation For Multiple Animals

View source: R/cu_crw_sample.R

cu_crw_sampleR Documentation

Batch CRW Posterior Path Simulation For Multiple Animals

Description

Uses a list of CRW fitted models and desired simulation times to make draws from the location (and velocity) posterior distribution for telemetered animals.

Usage

cu_crw_sample(
  fit,
  size = 8,
  predTime = NULL,
  barrier = NULL,
  vis_graph = NULL,
  as_sf = TRUE,
  ...
)

Arguments

fit

A CRW fit object

size

The number of posterior draws. Defaults to 8 (See Details).

predTime

A character string describing the desired frequency of prediction, e.g., predTime="1 hour" or predTime="15 min".

barrier

An sf polygon object representing areas where the animal cannot access.

vis_graph

A visibility graph constructed with the R package pathroutr, which is used to reroute paths around barriers.

as_sf

Logical. Return an sf points data frame list (TRUE) or standard crawl prediction list

...

Additional arguments passed to the foreach function, e.g., for error handling in the loop.

Details

The R package pathroutr is necessary for use of the barrier rerouting. it can be installed with the command install.packages('pathroutr', repos='https://jmlondon.r-universe.dev'). See 'https://github.com/jmlondon/pathroutr' for a description of use and constructing the viability vis_graph.

Author(s)

Devin S. Johnson


dsjohnson/crawlUtils documentation built on Sept. 13, 2024, 1:34 p.m.