popSize: Predict population density across the range of raster layers

View source: R/estimate abundance.r

popSizeR Documentation

Predict population density across the range of raster layers

Description

Predict number of individuals at each cell using Random Forest, based on environmental variables

Usage

popSize(ENV = BioClim, model = RF)

Arguments

ENV

A RasterBrick (a multi-layer raster object)

RF

A list object of the model results of Random Forest

Value

A raster layer with number of individuals at each cell

Author(s)

Xinhai Li (Xinhai_li_edu@126.com)

Examples


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))

Xinhai-Li/abundanceR documentation built on Feb. 1, 2024, 4:47 a.m.