ashSetupLandscape | R Documentation |
Setup a landscape for Ash for our simulations. everything but the surface is baked into holoSimCell
ashSetupLandscape(
brickname = system.file("extdata", "rasters", "ccsm_160kmExtent_maxent.tif", package
= "holoSimCell"),
equalsuit = F,
partialsuit = F,
cellreduce = 0.45,
xlim = NULL,
ylim = NULL,
timesteps = NULL
)
brickname |
name of a file of a geotiff object. layers correspond to time clicks in simulations |
equalsuit |
logical (TRUE / FALSE) indicating whether suitability is assumed to be equal in all cells across the landscape |
partialsuit |
logical (TRUE / FALSE) indicating whether fractional habitat suitabilities should be used |
cellreduce |
scalar specifying the proportional reduction in landscape dimensions from the input geotiff file (new dimensions = cellreduce x original dimensions) |
xlim |
optionally used to define the longitudinal dimension of the output landscape (if no geotiff object is supplied) |
ylim |
optionally used to define the latitudinal dimension of the output landscape (if no geotiff object is supplied) |
timesteps |
specifies the temporal dimension (number of time steps) of the output landscape |
This function reads in a geotiff raster brick and converts the individual rasters into matrices of habitat suitability. Returns a landscape object to be used in forward demographic simulations.
Returns a landscape object with the following components:
details
Data frame with the spatial extent of the landscape grid
occupied
Vector of population IDs for occupied cells in the landscape grid
empty
Vector of population IDs for empty cells in the landscape grid
sampled
Vector of population IDs for sampled populations in the landscape grid
hab_suit
Matrix with species habitat suitability (ranging from zero to one) through time. Rows in the matrix correspond to discrete time units and columns correspond to cells in the landscape
sumrast
Raster that stores the extent and resolution of the simulation landscape
samplocsrast
Raster showing the locations of cells that correspond to sampled populations
samplocs
Simple feature encoding spatial vector data related to the sampling populations and a data frame with metadata of the sampling populations (population id, number of individuals, type of spatial data and coordinates)
sampdf
Data frame with the spatial location of the sampling populations in the landscape grid
NAmask
A RasterBrick object used to mask cells that are unsuitable (e.g., covered by glaciers, out of the study region, in large lakes or oceans)
getpophist2.cells
, def_grid_pred2
library(holoSimCell)
m <- 1
landscape <- ashSetupLandscape(brickname=system.file("extdata", "rasters", "ccsm_160kmExtent_maxent.tif", package = "holoSimCell"),cellreduce=0.45,partialsuit=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.