Learn R Programming

wallace (version 2.0.2)

penvs_bgExtent: 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)

Value

A SpatialPolygonsDataFrame object that contains all occurrences from occs

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.

Author

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

Gonzalo E. Pinilla-Buitrago <gpinillabuitrago@gradcenter.cuny.edu>

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.

See Also

penvs_userBgExtent, penvs_drawBgExtent, penvs_bgMask , penvs_bgSample

Examples

Run this code
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)

Run the code above in your browser using DataLab