create_hab | R Documentation |
create_hab
parametrises and returns the
spatial fields used for the distribution of suitable habitat for the
populations in the simulation.
The spatial fields are generated using
RFsimulate
function from the RandomFields
package.
create_hab(
sim_init = sim,
seed = 123,
spp.ctrl = NULL,
spawn_areas = NULL,
spwn_mult = 10,
plot.dist = FALSE,
plot.file = getwd()
)
spp.ctrl |
List of controls to generate suitable habitat for each species. Must be of the form spp.ctrl = list(spp.1 = c(var = 20, ...), spp.2 = c(var = 10, ..),..) and contain the following:
|
plot.dist |
Boolean, whether to plot the distributions to file |
plot.file |
path to save the plots of the species distributions |
sim |
is the parameter settings for the simulation, made by
|
Silently returns a list of spatial distributions of suitable habitat
with first level of the list being the population (1 -> n.spp). If
plot.dist = TRUE
it produces an image of the spatial distributions at
each time step for each of the populations saved to the working directory
(unless specified otherwise in plot.file
)
hab <- create_hab(sim.init = sim.init, spp.ctrl = list(
'spp.1' = list('nu' = 1/0.15, var = 1, scale = 10, Aniso =
matrix(nc=2, c(1.5, 3, -3, 4)))), spawn_areas = list("spp1" =
list("area1" = c(2,4,6,8))), list("spp2" = list("area1" =
c(0,10,23,35))), spwn_mult = 10, plot.dist = TRUE, plot.file = getwd())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.