Description Usage Arguments Details Value Author(s) References
View source: R/Create_Landscapes.r
Creates a series of files with replicated complete encounter histories based on habitat and population parameters.
1 | createReplicates(n_runs, map, Parameters, ... )
|
n_runs |
number of replicate encounter histories to produce |
map |
a raster layer with underlying habitat information |
Parameters |
list of parameter values for simulation
(see |
... |
optional options (see details) |
This function will produce n_run
text files with simulated complete encounter histories. Each individual file does not contain identifying information about the parameters used to create it, so it will be good practice to create a folder structure to keep separate simulations separate. Default is to create a folder for the runs (./rSPACE_X) and name all encounter histories ./rSPACE_X/rSPACEx??.txt where ?? indicates the run number. If Parameters
is not specified, enter.parameters
will be called.
map
raster layer defining the landscape for the population simulation. Values of map
are used as weights for both selecting individual activity centers and scaling bivariate normal movement distributions. Raster layer should use either longlat or utm projections with meter units.
There are additional arguments that can be included to specify other options, but some are more sketchy than others.
Optional argument skipConfirm
will bypass the user-confirmation for creating a folder structure.
Optional argument run.label
changes the folder name for the run scenario. Defaults to './rSPACE_X'
Optional argument base.name
can be used to change the base file name for encounter history replicate files. Defaults to 'rSPACEx'
Optional argument filter.map
can be used to specify an alternative sampling frame for the landscape. The default sampling frame consists of a rectangular grid built from the habitat information in map
and user-specifications for Paramters$grid_size
and Parameters$sample.cutoff
. By providing a secondary raster layer via filter.map
, users can restrict sampling to specific areas (e.g., to exclude inaccessible private lands or restrict sampling to a single jurisdiction such as USFS, NPS, BLM, etc) or to provide a user-specific grid for the entire landscape. The raster provided in filter.map
will be expanded to match the extent of map
, with non-coded regions coded 0. Raster values of 0 in filter.map
are treated as areas to exclude from sampling. If filter.map
consists of 0/1 values only, the default rectangular grid will be restricted to areas with values of 1 in filter.map
. If filter.map
contains additional values, non-zero values will be treated as indentifiers for sampling cells in a user-specified grid.
Optional argument printN
defaults to TRUE. Logical - prints population size by run by year to a text file.
Optional argument saveParameters
defaults to TRUE. Logical - save rData file with parameter list used in run scenario.
Optional argument saveGrid
defaults to TRUE. Logical - save raster layer with sampling grid used in run scenario.
returns list with directory location and output file names
Martha Ellis
ELLIS, MARTHA M., JACOB S. IVAN, and MICHAEL K. SCHWARTZ. "Spatially Explicit Power Analyses for Occupancy-Based Monitoring of Wolverine in the US Rocky Mountains." Conservation Biology (2014).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.