prefHab: Habitat preference

Description Usage Arguments Value Author(s) Examples

View source: R/pref_hab_function.R

Description

Obtains the habitat preference of species in IUCN's database and put in the format required to the function aoh, based on the classification scheme of the user's land use map. The habitat preference is obtained through the rredlist package

Usage

1
2
3
4
5
prefHab(sp, key = NULL, cat = NULL,
suitability = c('Suitable', 'Marginal', 'Unknown'),
mi = FALSE,
season = c('Resident', 'Breeding','Non-breeding', 'Passage',
'Unknown'), progress = FALSE)

Arguments

sp

a vector containing the names or IUCN's IDs of the species.

key

A IUCN API token. You can request a key in the website http://apiv3.iucnredlist.org/api/v3/token

cat

a two columns data frame. The first column must have the codes from IUCN's Habitats Classification Scheme (Version 3.1). The second column must have the numeric code of the user's land use map that is equivalent to the IUCN's Habitats Classification Scheme. When there is no land use equivalent to the IUCN's classification, use the value 0. If no data frame is provided the function uses the dataset obtained through data(class_ref) as reference.

suitability

a vector specifying which levels of habitat suitability must be considered.

mi

(logical) only suitable habitats of major importance must be included?

season

a vector specifying which seasons of habitat importance must be considered.

progress

(logical) a bar showing the progress of the function.

Value

prefHab returns a data frame in which the first column is the name of the species and the posterior columns are the codes of the user's classification scheme. 1 indicates that the species has preference for a given class of land use while 0 indicates that it has not.

Author(s)

Daniel Gonçalves-Souza & Thaís Dória

Examples

1
2
3
4
## Not run:
sp <- c('Bradypus torquatus', 'Adelophryne maranguapensis', 'Dermatonotus muelleri')
prefHab(sp)
## End

thaisdoria/habitaR documentation built on Dec. 18, 2020, 8:09 p.m.