iucnn_bias_features: Extract Bias Features from Occurrence Records

View source: R/iucnn_bias_features.R

iucnn_bias_featuresR Documentation

Extract Bias Features from Occurrence Records

Description

Use the sampbias method to assess the geographic sampling bias at the locations where a species is collected and the range of sampling bias for all records per species.Values summarized per species are the median and the 0.05 to 0.95 percentiles.

Usage

iucnn_bias_features(
  x,
  species = "species",
  lon = "decimallongitude",
  lat = "decimallatitude",
  res = 0.5,
  ras = NULL,
  plot = TRUE
)

Arguments

x

a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal).

species

a character string. The name of the column with the species names.

lon

a character string. The name of the column with the longitude.

lat

a character string. The name of the column with the latitude.

res

numeric. The resolution of the default resolution to calculate sampling bias. In decimal degrees.

ras

a SpatRaster object. Alternative to res, a sample SpatRaster to calculate sampling bias. Needs to use the same CRS as the coordinates in x.

plot

logical. Should the results of the sampbias analysis be plotted for diagnostics?

Details

See the ?sampbias::calculate_bias for details.

Value

a data.frame of bias features

See Also

Other Feature preparation: iucnn_biome_features(), iucnn_climate_features(), iucnn_cnn_features(), iucnn_footprint_features(), iucnn_geography_features(), iucnn_phylogenetic_features(), iucnn_prepare_features(), iucnn_prepare_phy()

Examples

## Not run: 
dat <- data.frame(species = c("A", "b"),
                  decimallongitude = runif(200, 10, 15),
                  decimallatitude = runif(200, -5, 5))
iucnn_bias_features(dat)


## End(Not run)



azizka/IUCNN documentation built on March 29, 2024, 9:38 a.m.