Description Usage Arguments Value Author(s) See Also Examples
Crop a PresenceAbsence object based on a shapefile provided by the user.
1 | lets.pamcrop(x, shp, remove.sp = TRUE)
|
x |
A |
shp |
Object of class SpatialPolygonsDataFrame (see function |
remove.sp |
Logical, if |
The result is an object of class PresenceAbsence croped.
Bruno Vilela
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
data(PAM)
# PAM before crop
plot(PAM, xlab = "Longitude", ylab = "Latitude",
main = "Phyllomedusa species richness")
# Crop PAM to Brazil
require(maptools)
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)",
col = colorRampPalette(c("darkgreen", "yellow", "blue")))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.