plotdata: Visualization of datasets to be used for niche estimation.

Description Usage Arguments Details Value Examples

View source: R/plot-tools.R

Description

plotdata returns two plots that display the data needed to estimate the niche of a species in both geographical and environmental space.

Usage

1
plotdata(back, occ.sp, tolran, sp.col, envnames)

Arguments

back

numeric matrix that contains the background data for the species.

occ.sp

numeric matrix that contains the species occurrence data.

tolran

numeric matrix with one row and four columns named: xleft, ybottom, xright, ytop.

sp.col

character strign with a color name identifying the species.

envnames

character vector with the names of the environmental variables to work with.

Details

This function produce a visualization of the background points, the occurrence data and the tolerance ranges of the species of interest, in both the geographical and the environmental spaces (displaying only the firs two or three dimensions of the latter).

The first two columns of back must contain the longitude and latitude coordinates of all the points in the grid that define the region of interest, the remaining columns must contain the values (at least two) of the environmental variables at each location. Similarly, the first two columns of occu.sp must contain the geographical coordinates for the occurrence data, and the remaining columns must contain the environmental combinations. See the datasets backAM and Spocc, they are examples of the matrices back and occu.sp.

tolran must provide the tolerance limits (lower and upper bounds) for each environmental variable odd columns contain lower limits even columns containd the upper limits.

Value

A plot with two panels. The panel on the left will show the data in geographical space and the panel on the right will show the data in environmental space.

Examples

1
2
3
data("backAM","Spocc")
tolran1 <- c(0,1.2,-1,0.8)
plotdata(backAM,Spocc,tolran1,"tomato",c("Annual Mean Temp","Annual Mean Precip"))

LauraJim/benmR documentation built on May 16, 2019, 11:11 p.m.