ddbrwForager-class | R Documentation |
Constructor function for a Distance Discounting Biased Random Walk Forager class objects. Objects of this class have methods for finding targets, moving, and plotting. Movement switches between a biased random walk (with step lengths drawn from a gamma distribution and bearing drawn from a wrapped cauchy) and directed motion toward a target. Target selection is weighted toward closer targets.
location
a simple features collection with a single POINT class object
bearing
a numeric that gives the current bearing in radians. Default starting bearing is drawn from random uniform circular distribution
speed
a numeric value that gives the scale parameter of the gamma distribution from which step lengths are draw. Because the shape parameter of this distribution is set to 1, the speed variable will equal the average step length
sight
a numeric giving the distance at which the forager object can detect patches when in an environment
path
a simple features collection with a single multipoint object containing previous locations of the forager. Usually objects are created with default multipoint objects containing only the initial location
visitSeq
a character vector with the names (in order) of all patches visited. Must start with NAs equal in number to to the repeatAvoid variable (this is done by default if no value is given)
targeting
a logical giving which mode of movement the forager is in. Initial value usually uses default "FALSE"
repeatAvoid
numeric giving the number of different patches a forager must visit before targeting a recently visited patch again
target
a simple feature data frame with a single row containing the target patch location and values
turnBias
a numeric giving the radians from which the center of the wrapped cauchy distribution from which new bearings are drawn should be shifted from the previous bearing.
concentration
a numeric between 0 and one which gives the concentration of the wrapped cauchy distribution from which new bearings are drawn, where a 1 results in a turning angle equal to turnBias every step and a 0 results in a circular random uniform probability distribution
tSelect(choices)
calculates probablilites and selects a target from a list of options but DOES NOT set the target (use setTarget for this, which calls tSelect).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.