Learn R Programming

MetaLandSim (version 0.2)

range_raster: Probability of occupancy, dispersal model

Description

This function intends to create a raster map, estimating probability of occupancy, at a given time step, based on species dispersal and landscape configuration. range_raster uses the output from range_expansion and a raster map with the species current occupancy.

Usage

range_raster(presences.map, re.out, mask.map=NULL, plot.directions=TRUE)

Arguments

presences.map
string of the raster file name with species occurrence.
re.out
object of class list expansion. Output from range_expansion.
mask.map
default NULL. String of the raster file name with the mask. Usually, 1 over the area where the analyses should be done.
plot.directions
default TRUE. Whether It will (TRUE) or will not (FALSE) return a graphics for the expansion model functions and raster maps with expansion probabilities in all four cardinal points.

Value

  • an object of class RasterLayer (see Raster-class package for further description), which includes the probability of occupancy, at a given time step, considering only dispersal ability and landscape configuration.

Details

The function automatically reads the raster input files (presences.map and mask.map, if present). Usually, 0 for absence and 1 for presence in every square cell over a given resolution. Supported file types are those that can be read via rgdal (see http://www.gdal.org/formats_list.html{gdal}. Note that the projection for the raster layer should be one of those supporting metric units (i.e., linear scale is equal in all directions around any point such as Transverse Mercator; see http://spatialreference.org/).

Then, it computes and fits single sigmoidal functions for every direction on the expansion movements, as previously calculated in range_expansion and provided here. Four different raster maps are generated, every one of them estimating the probability of expansion for north, south, east and west directions. The four maps are finally summarized into a single range expansion map, which is returned to the user as an object of class RasterLayer.

This function uses internally a connection to http://grass.osgeo.org/{GRASS GIS software} through the package spgrass6-package, in order to increase the performance for geographical calculations.

References

The same as range_expansion.

See Also

range_expansion, Raster-class, spgrass6-package, initGRASS

Examples

Run this code
data(re.out)

presences <- system.file("examples/presences.asc", package="MetaLandSim")
mask <- system.file("examples/landmask.asc", package="MetaLandSim")

require(spgrass6)

#Initializing a GRASS session in a temporal directory:
#### Under Linux systems:
initGRASS("/usr/bin/grass", home=tempdir())
#### Under Windows systems:
initGRASS("C:/GRASS", home=tempdir())

range_raster(presences.map=presences, re.out=re.out, mask.map==mask) -> range.map

plot(range.map)

require(rasterVis)

levelplot(range.map, contour=TRUE)

Run the code above in your browser using DataLab