xfer_mess: xfer_mess generate MESS map for transferred raster

View source: R/xfer_mess.R

xfer_messR Documentation

xfer_mess generate MESS map for transferred raster

Description

This function generates a MESS map for the new variables for transferring based on variables and points used for modeling in previous components.

Usage

xfer_mess(occs, bg, bgMsk, xferExtRas, logger = NULL, spN = NULL)

Arguments

occs

a data frame of occurrences used for modeling and values of environmental variables for each point.

bg

a data frame of points used as background for modeling and values of environmental variables for each point.

bgMsk

a rasterBrick or rasterStack of environmental variables used for modeling. They must be cropped and masked to extent used in model training.

xferExtRas

a rasterStack or rasterBrick of environmental variables to be used for transferring.

logger

Stores all notification messages to be displayed in the Log Window of Wallace GUI. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL.

spN

character. Used to obtain species name for logger messages

Details

This functions allows for the creation of a MESS map for the new provided variables for transferring. These variables are either user uploaded or selected from WorldClim database. MESS map is based on occurrence and background points used for generating the model and the environmental values at those points.

Author(s)

Jamie Kass <jkass@gradcenter.cuny.edu>

Gonzalo E. Pinilla-Buitrago <gepinillab@gmail.com>

See Also

mess, xfer_time xfer_userEnvs

Examples

## Not run: 
envs <- envs_userEnvs(rasPath = list.files(system.file("extdata/wc",
                                           package = "wallace"),
                      pattern = ".tif$", full.names = TRUE),
                      rasName = list.files(system.file("extdata/wc",
                                           package = "wallace"),
                      pattern = ".tif$", full.names = FALSE))
# load model
m <- readRDS(system.file("extdata/model.RDS",
                         package = "wallace"))
occsEnvs <- m@occs
bgEnvs <- m@bg
envsFut <- list.files(path = system.file('extdata/wc/future',
                                         package = "wallace"),
                      full.names = TRUE)
envsFut <- raster::stack(envsFut)
## run function
xferMess <- xfer_mess(occs = occsEnvs, bg = bgEnvs, bgMsk = envs,
                      xferExtRas = envsFut)

## End(Not run)

wallace documentation built on Sept. 26, 2023, 1:06 a.m.