lets.maplizer: Create a matrix summarizing species' attributes within cells...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/lets_maplizer.R

Description

Summarize species atributes per cell in a presence-absence matrix.

Usage

1
lets.maplizer(x, y, z, func = mean, ras = FALSE)

Arguments

x

A PresenceAbsence object.

y

Species attribute to be considered. It must be a numeric attribute.

z

Species names in the same order as the attributes and exactly the same as named in the PresenceAbsence object.

func

A function to summarize the species' atribute in each cell (the function must return only one value).

ras

If TRUE the raster object will be returned together with the matrix.

Value

The result can be both a matrix or a list cointaining the follow objects:

Matrix: a matrix object with the cells' geographic coordinates and the summarized species' attributes within them.

Raster: The summarized species'attributed maped in a raster object.

Author(s)

Bruno Vilela

See Also

lets.presab

lets.presab.birds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(PAM)
data(IUCN)
trait <- IUCN$Description_Year
resu <- lets.maplizer(PAM, trait, PAM$S, ras = TRUE)
head(resu$Matrix)
plot(resu$Raster, xlab = "Longitude", ylab = "Latitude", 
main = "Mean description year per site") ; map(add = TRUE)

## End(Not run)

letsR documentation built on Oct. 27, 2020, 1:07 a.m.