visitation_net(samc, origin, dest)
has two changes to its behavior:passage()
function from gdistance and returned a vector using the origin and destination node information to perform a correction to the flow values.passage()
from gdistance. In retrospect, the final part of this implementation only works properly in the specific case of a single start point and a single end point, which is correct for the input requirements of passage()
, but is not quite correct for when there are multiple nodes with absorption. The new version properly accounts for general cases involving multiple absorbing locations and varying intensities of absorption. This does change the results from older versions. The difference between the two versions is equivalent to one half the results from mortality()
. In practice, landscapes with widespread absorption will see a negligible difference; in current large-scale examples, the effect is several magnitudes of order less than the net flow value. The difference may be more prominent when dealing with a very small number of absorbing nodes.visitation_net(samc, origin)
visitation_net(samc, init)
visitation_net(samc, init, dest)
precision
option in the options
list for samc()
. Can choose between "single"
and "double"
precisionsamc
objects built for convolutions."double"
and provides 15-16 digits of precision. This is the same as all previous versions."single"
option provides 7-8 digits precision, but also reduces RAM use by roughly half. It's also slightly faster for metric calculations (~20% less time on one device), and also scales slightly better with multiple cores.init
parameters regardless of the data type used for inputs to the samc()
function. This is intended to provide flexibility for special situations, and it's recommended that init
inputs reflect the data types used for samc()
.check()
node count approach for convolution.cond_passage(samc, init, dest)
dispersal(samc, origin, dest, time)
distribution(samc, init, dest, time)
mortality(samc, init, dest, time)
check()
that was preventing use of the init
parameter for samc objects created directly from a matrix.visitation_net()
function for calculating net movement flow (vs total from visitation()
)init
parameter.NA
values in landscape data.samc-class
objects from raster/map data; does not work with manually constructed transition matrices.origin
input. It does not support the init
or dest
inputs. The origin
input for CRW is a matrix with the cell number and a directionmap()
function averages the results for all directions. This could change in the future to allow for more flexibility.samc-class
object creation by eliminating overhead associated with user-defined functions. Currently, only "1/mean(x)"
is supported, but others can be added in the future.rasterize()
function publicly available. Mainly useful for converting matrices to a SpatRaster that matches the structure used internally by the package.visitation()
function.visitation()
functionvisitation()
function is feasible for samc objects with 50 Million cells with 32 GB of RAM. Details about changing the solver can be found in the help documentation for the samc-class
.samc()
function so that gdistance can be removed as a dependency.sym
option for creating the samc object is currently ignored.map()
function was updated so that the output matches the input types used in the samc()
function.tr_args
parameter to model
to reflect future anticipated support for different types of models. Current usage will not change and assumes a default random-walk model.occ
parameter in metrics to init
(short for "initial state" or "initialize")cond_passage()
function to match other metrics, but it is not currently used.samc()
function parameters. This is a breaking change that will make maintaining the package and adding new features a simpler process going forward, and that will hopefully only be a minor inconvenience for users. The warning message on package load introduced in v1.4.0 has been updated to reflect the new changes.cond_passage()
to return 0
for when i==j in the vectors. This fixes an issue associated with shifted indices in cond_passage(samc, dest)
. It also technically breaks backward compatibility for when dest
equals origin
in cond_passage(samc, origin, dest)
. Previously, cond_passage(samc, origin, dest)
would return NA
when origin
equaled dest
, but this decision was arbitrary. The cond_passage()
documentation explains why.dispersal(samc, origin/occ)
function via the RcppThread package. See the Parallel Computing vignette for details.samc()
. CRS objects have a hidden field that can vary depending on system and software versions, and previous versions of the check would not account for this. This would to lead to false positives where perfectly compatible rasters were reported as incompatible. The corresponding error message was also fixed to report the correct issue; the code was initially copied and modified from another input check, but the error message wasn't updated in the process.absorption
parameter in samc() is treated as the total absorption (consistent with previous behavior). After the creation of the samc-class object, additional absorbing states can be attached to the samc-class object. See the samc-class documentation and the new Multiple Absorption tutorial for more details. Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.