lets.pamcrop {letsR} | R Documentation |
Crop a PresenceAbsence object based on an input shapefile
Description
Crop a PresenceAbsence object based on a shapefile provided by the user.
Usage
lets.pamcrop(x, shp, remove.sp = TRUE)
Arguments
x |
A |
shp |
Object of class SpatVector (see function
|
remove.sp |
Logical, if |
Value
The result is an object of class PresenceAbsence croped.
Author(s)
Bruno Vilela
See Also
Examples
## Not run:
data(PAM)
data("wrld_simpl")
# PAM before crop
plot(PAM, xlab = "Longitude", ylab = "Latitude",
main = "Phyllomedusa species richness")
# Crop PAM to Brazil
data(wrld_simpl) # World map
Brazil <- wrld_simpl[wrld_simpl$NAME == "Brazil", ] # Brazil (polygon)
PAM_crop <- lets.pamcrop(PAM, Brazil, remove.sp = TRUE)
plot(PAM_crop, xlab = "Longitude", ylab = "Latitude",
main = "Phyllomedusa species richness (Brazil crop)")
plot(sf::st_geometry(wrld_simpl), add = TRUE)
## End(Not run)
[Package letsR version 5.0 Index]