An alternative spread function -- conceived for insects

This is built with spread2 and is still experimental.
This one differs from other attempts in that it treats the advection and
dispersal as mathematical vectors that are added together.
They are "rounded" to pixel centres.

Arguments

start

Raster indices from which to initiate dispersal

rasQuality

A raster with habitat quality. Currently, must
be scaled from 0 to 1, i.e., a probability of "settling"

rasAbundance

A raster where each pixel represents the number
of "agents" or pseudo-agents contained. This number of agents, will
be spread horizontally, and distributed from each pixel
that contains a non-zero non NA value.

advectionDir

A single number or RasterLayer in degrees
from North = 0 (though it will use radians if all values are
abs(advectionDir) > 2 * pi). This indicates
the direction of advective forcing (i.e., wind).

advectionMag

A single number or RasterLayer in distance units of the
rasQuality, e.g., meters, indicating the relative forcing that will
occur. It is imposed on the total event, i.e., if the meanDist is
10000, and advectionMag is 5000, then the expected
distance (i.e., 63% of agents) will have settled by 15000 map units.

meanDist

A single number indicating the mean distance parameter in map units
(not pixels), for a negative exponential distribution
dispersal kernel (e.g., dexp). This will mean that 63
settled at this meanDist (still experimental)

plot.it

Numeric. With increasing numbers above 0, there will be plots
produced during iterations. Currently, only 0, 1, or 2+ are distinct.

minNumAgents

Single numeric indicating the minimum number of agents
to consider all dispersing finished. Default is 50

verbose

Numeric. With increasing numbers above 0, there will be more
messages produced. Currently, only 0, 1, or 2+ are distinct.

saveStack

If provided as a character string, it will save each iteration
as part of a rasterStack to disk upon exit.