biaslayer estimates a raster that represents the sampling bias; it can be used in the maxent_call{ntbox}
function.
biaslayer(occs_df, longitude, latitude, raster_mold)
occs_df | A data.frame with the occurrence data and coordinates. |
---|---|
longitude | A character vector of the column name of longitude. |
latitude | A character vector of the column name of latitude. |
raster_mold | A raster of the calibration area. This will serve just as a mold to make the bias layer. |
The biaslayer uses the 2 dimensional kernel desity estimator kde2d{MASS}
.
# Birds of North America birds <- read.csv(system.file("extdata", "birdsN_America.csv", package = "ntbox")) bio01 <- raster::raster(system.file("extdata", "bio01_bias.tif", package = "ntbox")) biasBirds <- biaslayer(occs_df = birds, longitude = "Longitude", latitude = "Latitude", raster_mold = bio01) raster::plot(biasBirds)