delim.area: RasterStack preparation for modelling

View source: R/delim_area.R

delim.areaR Documentation

RasterStack preparation for modelling

Description

Delimit the RasterStack of environmental descriptors at a precise extent (latitude, longitude, maximum depth...) before computing species distribution modelling

Usage

delim.area(predictors, longmin, longmax, latmin, latmax, interval=NULL,
           crslayer = raster::crs(predictors))

Arguments

predictors

RasterStack object that contains the environmental predictors used for species distribution models

longmin

Expected minimum longitude of the RasterStack

longmax

Expected maximum longitude of the RasterStack

latmin

Expected minimum latitude of the RasterStack

latmax

Expected maximum latitude of the RasterStack

interval

Vector of 2. Minimum and maximum values outside of which the pixel values of the RasterStack first layer will be assigned to NA values. Set as NULL by default (no treatment).

crslayer

CRS object or character string describing a projection and datum. The crs of the original RasterStack is set by default

Details

interval enable the user to delimit the RasterStack according to an interval of values applied on the first layer of the RasterStack. It is often applied on depth in SDM studies.

Missing values contained in the provided RasterStack must be set up as NA values.

Value

RasterLayer object

See Also

stack, raster, origin, extent

Examples

data('predictors2005_2012')
envi <- predictors2005_2012

r <- SDMPlay:::delim.area(predictors = envi,
longmin = 70,longmax = 75, latmin = -50,latmax = -40,interval = c(0,-1000))
r

library(grDevices) # plot the result with nice colors
palet.col <- colorRampPalette(c('deepskyblue','green','yellow', 'red'))(80)
raster::plot(r, col=palet.col)

charleneguillaumot/SDMPlay documentation built on Feb. 2, 2023, 1:09 p.m.