View source: R/lets_maplizer.R
lets.maplizer | R Documentation |
Summarize species atributes per cell in a presence-absence matrix.
lets.maplizer(x, y, z, func = mean, ras = FALSE)
x |
A |
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 |
func |
A function to summarize the species' atribute in each cell (the function must return only one value). |
ras |
If |
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
SpatRaster
object.
Bruno Vilela
lets.presab
lets.presab.birds
## 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.