plotUseAvailability: Plots density functions of use versus availability from a...

Description Usage Arguments Value Author(s) Examples

View source: R/plotUseAvailability.R

Description

Plots the relative densities of ones (presence, a.k.a, "use") versus zeroes (background, a.k.a, "availability") for each environmental predictor in a training data frame. This plot helps to understand the relationship between use and availability in order to make informed decisions during variable selection. When for a given variable the density of use peaks over low availability it indicates that the species selects those values of a variable at a higher rate than what is expected by chance. On the other hand, variables with a very high overlap between use and availability will likely turn out to have a low predictive value during SDM fitting.

Usage

1
2
3
4
5
6
7
8
9
plotUseAvailability(
  x,
  presence.column = "presence",
  variables = NULL,
  exclude.variables = NULL,
  axis.text.size = 6,
  legend.text.size = 12,
  strip.text.size = 10
)

Arguments

x

A data frame with a presence column with 1 indicating presence and 0 indicating background, and columns with predictor values.

presence.column

Character, name of the presence column.

variables

Character vector, names of the columns representing predictors. If NULL, all numeric variables but presence.column are considered.

exclude.variables

Character vector, variables to exclude from the analysis.

axis.text.size

Numeric, size of the axis labels.

legend.text.size

Numeric, size of the legend labels.

strip.text.size

Numeric, size of the panel names.

Value

A ggplot object.

Author(s)

Blas Benito <blasbenito@gmail.com>

Examples

1
2
3
4
5
6
7
data("virtualSpeciesPB")
x <- plotUseAvailability(
 x = virtualSpeciesPB,
 presence.column = "presence",
 variables = NULL,
 exclude.variables = c("x", "y")
)

BlasBenito/SDMworkshop documentation built on March 4, 2020, 4:16 a.m.