Package 'spidR'

Title: Spider Knowledge Online
Description: Allows the user to connect with the World Spider Catalogue (WSC; <https://wsc.nmbe.ch/>) and the World Spider Trait (WST; <https://spidertraits.sci.muni.cz/>) databases. Also performs several basic functions such as checking names validity, retrieving coordinate data from the Global Biodiversity Information Facility (GBIF; <https://www.gbif.org/>), and mapping.
Authors: Pedro Cardoso [aut, cre]
Maintainer: Pedro Cardoso <[email protected]>
License: GPL-3
Version: 1.0.2
Built: 2024-11-23 06:44:56 UTC
Source: CRAN

Help Index


Get species authors from WSC.

Description

Get species authority from the World Spider Catalogue.

Usage

authors(tax, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

order

Order taxa alphabetically or keep as in tax.

Details

This function will get species authorities from the World Spider Catalogue (2021). Higher taxa will be converted to species names.

Value

A data.frame with species and authority names.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
authors("Amphiledorus")
authors(tax = c("Iberesia machadoi", "Nemesia bacelarae", "Amphiledorus ungoliantae"), order = TRUE)

## End(Not run)

Check taxa names in WSC.

Description

Check taxa names against the World Spider Catalogue.

Usage

checknames(tax, full = FALSE, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

full

returns the full list of names.

order

Order taxa alphabetically or keep as in tax.

Details

This function will check if all species, genera and family names in tax are updated according to the World Spider Catalogue (2021). If not, it returns a matrix with valid synonym or possible misspellings using fuzzy matching (Levenshtein edit distance).

Value

If any mismatches, a matrix with taxa not found in WSC or, if full = TRUE, the full list of names.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
tax = c("Nemesis", "Nemesia brauni", "Iberesia machadoi", "Nemesia bacelari")
checknames(tax)
checknames(tax, full = TRUE, order = TRUE)

## End(Not run)

Get species distributions from WSC.

Description

Get species distribution from the World Spider Catalogue.

Usage

distribution(tax, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

order

Order taxa alphabetically or keep as in tax.

Details

This function will get species distributions from the World Spider Catalogue (2021).

Value

A data.frame with species and distribution. Family and genera names will be converted to species.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
distribution("Nemesia")
distribution(tax = c("Iberesia machadoi", "Amphiledorus ungoliantae"), order = TRUE)

## End(Not run)

Get species LSID from WSC.

Description

Get species LSID from the World Spider Catalogue.

Usage

lsid(tax, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

order

Order taxa names alphabetically or keep as in tax.

Details

This function will get species LSID from the World Spider Catalogue (2021). Family and genera names will be converted to species.

Value

A data.frame with species and LSID.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
lsid("Anapistula")
lsid(tax = c("Iberesia machadoi", "Nemesia bacelarae", "Amphiledorus ungoliantae"), order = TRUE)

## End(Not run)

Map species ranges.

Description

Maps species range according to the World Spider Catalogue and records according to GBIF and the World Spider Trait database.

Usage

map(
  tax,
  countries = TRUE,
  records = TRUE,
  hires = FALSE,
  zoom = FALSE,
  order = FALSE
)

Arguments

tax

A taxon name or vector with taxa names.

countries

Maps countries according to WSC.

records

Maps records according to GBIF and WST.

hires

Provides high resolution maps. Beware it might take longer to render.

zoom

If records is TRUE, the map will be zoomed to the region with records.

order

Order taxa names alphabetically or keep as in tax.

Details

Countries based on the interpretation of the textual descriptions available at the World Spider Catalogue (2021). These might be only approximations to country level and should be taken with caution.

Value

A world map with countries and records highlighted.

References

Pekar, S., Cernecka, L., Wolff, J., Mammola, S., Cardoso, P., Lowe, E., Fukushima, C.S., Birkhofer, K. & Herberstein, M.E. (2021). The world spider trait database. Masaryk University, Brno, URL: https://spidertraits.sci.muni.cz

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
map(c("Pardosa hyperborea"))
map("Amphiledorus", zoom = TRUE)
map(c("Pardosa hyperborea", "Iberesia machadoi"), countries  = FALSE, hires = TRUE, zoom = TRUE)

## End(Not run)

Get coordinate data from GBIF and WST.

Description

Downloads coordinate data from records in GBIF and the World Spider Trait database.

Usage

records(tax, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

order

Order taxa names alphabetically or keep as in tax.

Details

Outputs non-duplicate records with geographical (long, lat) coordinates. As always when using data from multiple sources the user should be careful and check if records "make sense" before using them.

Value

A data.frame with species name, longitude, latitude, source database and reference.

References

Pekar, S., Cernecka, L., Wolff, J., Mammola, S., Cardoso, P., Lowe, E., Fukushima, C.S., Birkhofer, K. & Herberstein, M.E. (2021). The world spider trait database. Masaryk University, Brno, URL: https://spidertraits.sci.muni.cz

Examples

## Not run: 
records("Pardosa hyperborea")
records(tax = c("Pardosa hyperborea", "Anapistula"), order = TRUE)

## End(Not run)

Get species from higher taxa.

Description

Get species within given families or genera from the World Spider Catalogue.

Usage

species(tax, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

order

Order species names alphabetically.

Details

This function will get all species currently listed for given families or genera from the World Spider Catalogue (2021).

Value

A vector with species names.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
species("Amphiledorus")
species(tax = c("Amphiledorus", "Nemesiidae"), order = TRUE)

## End(Not run)

Get taxonomy from species.

Description

Get species sub/infraorder, family and genus from the World Spider Catalogue.

Usage

taxonomy(tax, check = FALSE, aut = FALSE, id = FALSE, order = FALSE)

Arguments

tax

A taxon name or vector with taxa names.

check

species names should be replaced by possible matches in the WSC if outdated.

aut

add species authorities.

id

the lsid should be returned.

order

Order taxa names alphabetically or keep as in tax.

Details

This function will get species sub/infraorder, family and genus from the World Spider Catalogue (2021). Optionally, it will correct the species names (using function checknames) and provide the lsid and authors from the WSC (using functions lsid and authors).

Value

A data.frame with species and taxonomy.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
taxonomy("Symphytognathidae", order = TRUE)
taxonomy(c("Nemesia machadoi", "Nemesia bacelari"), check = TRUE, aut = TRUE, id = TRUE)

## End(Not run)

Get trait data from WST.

Description

Downloads the most recent data from the World Spider Trait database.

Usage

traits(
  tax,
  trait = NULL,
  sex = NULL,
  life = NULL,
  country = NULL,
  habitat = NULL,
  user = "",
  key = "",
  order = FALSE
)

Arguments

tax

A taxon name or vector with taxa names.

trait

A vector with required trait(s) as abbreviations. Valid values can be found at: https://spidertraits.sci.muni.cz/traits

sex

A vector with required sex(es).

life

A vector with required life stage(s).

country

A vector with required country(ies) ISO3 code(s).

habitat

A vector with required habitat(s).

user

To obtain restricted data get a user name from https://spidertraits.sci.muni.cz/api.

key

To obtain restricted data get an api key from https://spidertraits.sci.muni.cz/api.

order

Order taxa names alphabetically or keep as in tax.

Details

The World Spider Trait database (Pekar et al. 2021) has been designed to contain trait data in a broad sense, from morphological traits to ecological characteristics, ecophysiology, behavioural habits, and more (Lowe et al. 2020). This function will download everything available for the taxa given, possibly filtered to the traits given in parameter trait. Some data might be restricted access, in which case a user name and api key are needed (https://spidertraits.sci.muni.cz/api), otherwise the value will show as NA.

Value

A matrix with trait data.

References

Lowe, E., Wolff, J.O., Aceves-Aparicio, A., Birkhofer, K., Branco, V.V., Cardoso, P., Chichorro, F., Fukushima, C.S., Goncalves-Souza, T., Haddad, C.R., Isaia, M., Krehenwinkel, H., Audisio, T.L., Macias-Hernandez, N., Malumbres-Olarte, J., Mammola, S., McLean, D.J., Michalko, R., Nentwig, W., Pekar, S., Petillon, J., Privet, K., Scott, C., Uhl, G., Urbano-Tenorio, F., Wong, B.H. & Herbestein, M.E. (2020). Towards establishment of a centralized spider traits database. Journal of Arachnology, 48: 103-109. https://doi.org/10.1636/0161-8202-48.2.103

Pekar, S., Cernecka, L., Wolff, J., Mammola, S., Cardoso, P., Lowe, E., Fukushima, C.S., Birkhofer, K. & Herberstein, M.E. (2021). The world spider trait database. Masaryk University, Brno, URL: https://spidertraits.sci.muni.cz

Examples

## Not run: 
traits("Atypus affinis")
traits("Atypus", order = TRUE)
traits("Atypidae", country = c("PRT", "CZE"), order = TRUE)
traits(c("Zodarion costapratae", "Zodarion alacre"))
traits(c("Iberesia machadoi", "Zodarion costapratae"), trait = c("balo", "bole"))

## End(Not run)

Downloads WSC data.

Description

Downloads the most recent data from the World Spider Catalogue.

Usage

wsc()

Details

The World Spider Catalog (2021) lists all currently valid species of spiders, from Clerck to date. Updated daily.

Value

A matrix with all current species names and distribution. This should be used for other functions using wsc data.

References

World Spider Catalog (2021). World Spider Catalog. Version 22.0. Natural History Museum Bern, online at http://wsc.nmbe.ch. doi: 10.24436/2.

Examples

## Not run: 
wsc()

## End(Not run)

Matrix matching WSC and ISO3 country codes.

Description

A dataset that links species distribution descriptions with the map using the ISO3 code

Usage

data(wscmap)

Format

A matrix with regions and corresponding ISO3 codes.