lets.classvar: Frequency distribution of a variable within a species' range

View source: R/lets_classvar.R

lets.classvarR Documentation

Frequency distribution of a variable within a species' range

Description

Based on a species Presence-Absence matrix including variables of interest (see lets.addvar), the function divides a continuous variable into classes and counts the frequency of each class within each species' range.

Usage

lets.classvar(x, groups = "default", pos, xy)

Arguments

x

Presence-absence matrix with a single variable added (see lets.addvar).

groups

The number of classes into which the variable will be divided. Default calculates the number of classes as the default for a histogram (hist).

pos

Column number containing the variable of interest.

xy

Logical, if TRUE the input matrix contains the geographic coordinates in the first two columns.

Value

A matrix with species in the rows and the variable's classes in the columns.

Author(s)

Bruno Vilela

References

Morales-Castilla et al. 2013. Range size patterns of New World oscine passerines (Aves): insights from differences among migratory and sedentary clades. Journal of Biogeography, 40, 2261-2273.

Examples

## Not run: 
data(PAM)
data(temp)
pamvar <- lets.addvar(PAM, temp)
resu <- lets.classvar(x = pamvar, pos = ncol(pamvar), xy = TRUE)

## End(Not run)
  

BrunoVilela/letsR documentation built on March 31, 2024, 11:25 p.m.