| DispersalTemplate | R Documentation |
R6 class representing a nested container for
DispersalGenerator attributes that are maintained when new model clones
are created. The container maintains input and output attribute names,
file, function and distribution templates, correlation parameters (for distribution
generation), rounding decimals, occupancy mask, and other
DispersalGenerator attributes that need to be maintained when cloning.
poems::GenerativeTemplate -> DispersalTemplate
attachedA list of dynamically attached attributes (name-value pairs).
descriptionA brief description of what the generator generates.
inputsAn array of input attribute names for the generator.
outputsAn array of output attribute names for the generator.
file_templatesA nested list of file template attributes.
function_templatesA nested list of function template attributes.
distribution_templatesA list of distribution template attributes.
uses_correlationsA boolean to indicate that a SpatialCorrelation (or inherited class) object is used for generating correlated random deviates.
spatial_correlationA SpatialCorrelation (or inherited class) object for generating correlated random deviates.
temporal_correlationAbsolute correlation coefficient between simulation time steps for all grid cells (0-1; default = 1).
time_stepsNumber of simulation time steps.
decimalsNumber of decimal places applied to generated data outputs (default: NULL = no rounding).
occupancy_maskOptional binary mask array (matrix), data frame, or raster (stack) for generated (time-series) data outputs.
dispersal_frictionA DispersalFriction (or inherited class) object for dispersal distance multiplier data.
distance_classesVector of distance interval boundaries (in km) for calculating discrete dispersal rates.
max_distance_classesThe maximum number of distance classes when they are calculated automatically via the maximum distance (default: 1000).
distance_scaleScale of distance values in meters (default = 1). Usage: set to 1 for values in meters, or to 1000 for values in kilometers.
distance_dataData frame of distance classes including indices for the construction of compact matrices (columns: target_pop, source_pop, compact_row, distance_class).
dispersal_function_dataData frame of discrete dispersal function values. Optional first column may provide distance intervals (non-inclusive lower bounds).
dispersal_proportionDispersal function: p*exp(-distance/b) p parameter. Represents the proportion and limit of dispersers between model cells.
dispersal_breadthDispersal function: p*exp(-distance/b) b parameter. Represents the breadth of the dispersal between model cells. Typically estimated via average migration distance.
dispersal_max_distanceDispersal maximum distance or range (r) parameter limits the use of the dispersal function: p*exp(-distance/b). The function is utilized when distance <= r otherwise the dispersal rate is set to zero.
clone()The objects of this class are cloneable with this method.
DispersalTemplate$clone(deep = FALSE)
deepWhether to make a deep clone.
dispersal_template <- DispersalTemplate$new()
dispersal_template$dispersal_breadth <- 130
dispersal_template$dispersal_proportion <- 0.4
coordinates <- data.frame(x = rep(1:4, 4), y = rep(1:4, each = 4))
dispersal_gen <- DispersalGenerator$new(
coordinates = coordinates, inputs = c("dispersal_r"),
generative_template = dispersal_template
)
dispersal_gen$dispersal_breadth
dispersal_gen$dispersal_proportion
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.