View source: R/estimate abundance.r
popSize | R Documentation |
Predict number of individuals at each cell using Random Forest, based on environmental variables
popSize(ENV = BioClim, model = RF)
ENV |
A RasterBrick (a multi-layer raster object) |
RF |
A list object of the model results of Random Forest |
A raster layer with number of individuals at each cell
Xinhai Li (Xinhai_li_edu@126.com)
pred = popSize(BioClim, RF)
plot(pred)
plot(log(1+log(1+pred)), xlab="Longitude", ylab="Latitude", main='',
col=colorRampPalette(c("grey90", "green", "yellow", "red"))(12)) #topo.colors(20)
lines(shape)
library(calibrate)
attach(loc)
loc1 = loc[loc$Class==1,]
loc2 = loc[loc$Class==2,]
loc3 = loc[loc$Class==3,]
textxy(loc1$lon, loc1$lat, loc1$Name, cex=0.8);textxy(loc2$lon, loc2$lat, loc2$Name, cex=0.6);textxy(loc3$lon, loc3$lat, loc3$Name, cex=0.4);points(loc1$lon, loc1$lat, pch=16, cex=1, col='brown')
points(species$Lon, species$Lat, pch=16, cex=species$Count/20, col=adjustcolor("darkgreen", 0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.