penvs_bgExtent: penvs_bgExtent Generate background extent

View source: R/penvs_bgExtent.R

penvs_bgExtentR Documentation

penvs_bgExtent Generate background extent

Description

This function generates a background area according to a user- provided method.

Usage

penvs_bgExtent(occs, bgSel, bgBuf, logger = NULL, spN = NULL)

Arguments

occs

data frame of cleaned or processed occurrences obtained from components occs: Obtain occurrence data or, poccs: Process occurrence data.

bgSel

character. Method of background building. Must be one of three options: 'bounding box' , 'point buffers' or ' minimum convex polygon'.

bgBuf

numeric. Buffer distance in degrees to be used in the building of the background area.

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

data frame of cleaned occurrences obtained from component occs: Obtain occurrence data. Used to obtain species name for logger messages.

Details

This function is used in the select study region component. Here, the user can select between three methods ('bounding box', 'point buffers' or ' minimum convex polygon') to determine the background extent based on the observed occurrences. The function returns a SpatialPolygonsDataFrame object of the desired extent.

Value

A SpatialPolygons object that contains all occurrences from occs

Author(s)

Jamie Kass <jamie.m.kass@gmail.com>

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

Bethany A. Johnson <bjohnso005@citymail.cuny.edu>

See Also

penvs_userBgExtent, penvs_drawBgExtent, penvs_bgMask , penvs_bgSample

Examples

occs <- read.csv(system.file("extdata/Bassaricyon_alleni.csv",
                 package = "wallace"))[, 2:3]
occs$occID <- 1:nrow(occs)
bgExt <- penvs_bgExtent(occs, bgSel = 'bounding box', bgBuf = 0.5)


wallace documentation built on Sept. 11, 2024, 9:16 p.m.