biaslayer: biaslayer: Function to create a bias layer

View source: R/biaslayer.R

biaslayerR Documentation

biaslayer: Function to create a bias layer

Description

biaslayer estimates a raster that represents the sampling bias; it can be used in the maxent_call{ntbox} function.

Usage

biaslayer(occs_df, longitude, latitude, raster_mold)

Arguments

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.

Details

The biaslayer uses the 2 dimensional kernel desity estimator kde2d{MASS}.

Examples

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


luismurao/ntbox documentation built on May 9, 2024, 8:24 p.m.