Learn R Programming

letsR (version 1.0)

lets.addvar: Add variables to a PresenceAbscence object

Description

Add variables (in raster format) to a PresenceAbsence object.

Usage

lets.addvar(x, y, onlyvar=F, fun=mean)

Arguments

x
A PresenceAbsence object.
y
Variables to be added in Raster or RasterStack format.
onlyvar
If TRUE only the matrix object will be returned.
fun
Function used to aggregate values.

Value

  • The result is a presence-absence matrix of species with the variables added as columns at the right-end of the matrix.

See Also

lets.presab.birds lets.presab lets.addpoly

Examples

Run this code
data(temp)  # Global mean temperature
data(PAM)  # Phyllomedusa presence-absence matrix
PAM_temp <- lets.addvar(PAM, temp)

Run the code above in your browser using DataLab