artificialBellResponse: artificialBellResponse

Description Usage Arguments Details Value References Examples

View source: R/artificial_bell_response.R

Description

artificial bell response method

Usage

1
2
artificialBellResponse(env.stack, config, stack = FALSE,
  compose = "product", rescale = TRUE)

Arguments

env.stack

a rasterStack object that contain the environment variable

config

config is a list or matrix or data.frame that contain config info, details see details part

stack

stack is an option that if you want not compose them togethor (result return as a rasterStack). Default is FALSE

compose

the method compose the suitability together. Default is product

rescale

if TRUE each environment will rescale before compose together

Details

This method mainly implement artificial bell response method, more detail see references.

Value

rasterLayer or rasterStack if stack is set to TRUE

References

Varela, S., Anderson, R. P., García-Valdés, R., & Fernández-González, F. (2014). Environmental filters reduce the effects of sampling bias and improve predictions of ecological niche models. Ecography.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# load the sdmvspecies library
library("sdmvspecies")
library("raster")
# find package's location
package.dir <- system.file(package="sdmvspecies")
# let see where is our sdmvspecies is installed in
package.dir
# find env dir under the package's location
env.dir <- paste(package.dir, "/external/env/", sep="")
# let see env dir
env.dir
# get the environment raster file
file.name <- files <- c("bio1.bil", "bio12.bil", "bio7.bil", "bio5.bil")
files <- paste(env.dir, file.name, sep="")
# make raster stack
env.stack <- stack(files)
# config
config <- list(c("bio1",150, 50), c("bio12", 2000, 500), c("bio7", 400, 100), c("bio5", 300, 100))
# run pick mean
species.raster <- artificialBellResponse(env.stack, config)
# plot map
plot(species.raster)
# species distribution map
species.distribution.raster <- species.raster > 0.2
# plot map
plot(species.distribution.raster)

sdmvspecies documentation built on May 2, 2019, 5:11 a.m.