penvs_bgMask | R Documentation |
This functions crops and masks the environmental data to the provided background area.
penvs_bgMask(occs, envs, bgExt, logger = NULL, spN = NULL)
occs |
data frame of cleaned or processed occurrences obtained from components occs: Obtain occurrence data or, poccs: Process occurrence data. |
envs |
a RasterStack or RasterBrick of environmental layers to be processed. This determines the output type. |
bgExt |
a SpatialPolygonsDataFrame with the background area to be used for processing. |
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 |
species name to be used for all logger messages |
This function is used in the select study region component. Here, the environmental layers to be used in the modeling are cropped and masked to the provided background area. The background area is determined in the function penvs_bgExtent from the same component. The function returns the provided environmental layers cropped and masked in the provided format (either a rasterBrick or a rasterStack).
A RasterStack or a RasterBrick of environmental layers cropped and masked to match the provided background extent.
Jamie Kass <jamie.m.kass@gmail.com>
Gonzalo E. Pinilla-Buitrago <gepinillab@gmail.com>
penvs_userBgExtent
,
penvs_drawBgExtent
, penvs_bgExtent
,
penvs_bgSample
## Not run:
occs <- read.csv(system.file("extdata/Bassaricyon_alleni.csv",
package = "wallace"))[, 2:3]
occs$occID <- 1:nrow(occs)
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))
bgExt <- penvs_bgExtent(occs, bgSel = 'bounding box', bgBuf = 0.5)
bgMask <- penvs_bgMask(occs, envs, bgExt)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.