Package 'rtaxref'

Title: An R client for TaxRef the French Taxonomical Database
Description: Provides an R client to the TaxRef API <https://taxref.mnhn.fr/taxref-web/api/doc>, the French Taxonomical Reference Database which indexes names of species with unique identifiers as well as conservation statuses, biological interactions and taxonomic relationships.
Authors: Matthias Grenié [aut, cre] , Hugo Gruson [aut]
Maintainer: Matthias Grenié <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-08 04:12:54 UTC
Source: https://github.com/Rekyt/rtaxref

Help Index


Retrieve biogeographic statuses used in TAXREF

Description

If the function is used without arguments returns the list of biogeographic statuses used in TAXREF

Usage

rt_biogeo_status(biogeo_id = NULL)

Arguments

biogeo_id

NULL or character(1) [default = NULL]
A biogeographic status id used in TAXREF

Examples

## Not run: rt_biogeo_status(biogeo_id = "P")

Retrieve external DBs referenced in TAXREF

Description

If the function is used without arguments returns the list of external databases used in TAXREF.

Usage

rt_external_db(db_id = NULL)

Arguments

db_id

NULL or character(1) [default = NULL]
The id of an external db referenced in TAXREF

Examples

## Not run: rt_external_db(db_id = "worms")

Retrieve habitats used in TAXREF

Description

If the function is used without arguments returns the list of habitats used in TAXREF.

Usage

rt_habitats(habitat_id = NULL)

Arguments

habitat_id

NULL or integer(1) [default = NULL]
The id of a habitat referenced in TAXREF

Habitats

  • 1 = Marine

  • 2 = Freshwater

  • 3 = Terrestrial

  • 4 = Marine and freshwater

  • 5 = Marine and Terrestrial

  • 6 = Brackish water

  • 7 = Continental (terrestrial and/or freshwater)

  • 8 = Continental (terrestrial and freshwater)

Examples

## Not run: rt_habitats(habitat_id = 8)

Retrieve the status of all Taxa according to a Status Type

Description

Retrieve the status of all Taxa according to a Status Type

Usage

rt_interactions_find_type(interaction_id = NULL, page = 1, size = 2000)

Arguments

interaction_id

character(1) [required]
The identifier of status (see rt_interactions_type() for the list of status types)

page

integer(1) [default = 1]
The page number returned

size

integer(1) [default = 2000]
The number of lines returned per page (maximum = 2000)

See Also

the list of status types rt_interactions_type()

Examples

## Not run: rt_interactions_find_type(interaction_id = "GALLES")

Retrieve the interactions of all Taxa in an Operational Group

Description

Retrieve the interactions of all Taxa in an Operational Group

Usage

rt_interactions_opgroup(opgroup_id = NULL, page = 1, size = 2000)

Arguments

opgroup_id

integer(1) [required]
identifier of the operational group (see the list of operational groups rt_operational_groups())

page

integer(1) [default = 1]
The page number returned

size

integer(1) [default = 2000]
The number of lines returned per page (maximum = 2000)

See Also

the list of operational groups rt_operational_groups()

Examples

## Not run: rt_interactions_opgroup(opgroup_id = 706)

Retrieve Interactions Types used in TAXREF

Description

If used without argument returns the list of all interactions used in TAXREF

Usage

rt_interactions_type(interaction_id = NULL)

Arguments

interaction_id

NULL or character(1) [default = NULL]
A character identifying the type of interactions

Examples

## Not run: rt_interactions_type(interaction_id = "PREDATEUR")

Retrieve the languages used in TAXREF

Description

If used without argument returns the list of languages used in TAXREF otherwise the specific

Usage

rt_languages(languages_id = NULL)

Arguments

languages_id

NULL or character(1) [default = NULL]
three-letter lowercase code that is the id of a language referenced in TAXREF

Examples

## Not run: 
# Retrieve the TAXREF definition in the Wayana Language
rt_languages(languages_id = "way")

## End(Not run)

Retrieve operational groups used in TAXREF

Description

Operational Groups are names of groups either taxonomic or vernacular used across TAXREF in French. If used without argument returns the list of all operational groups used in TAXREF.

Usage

rt_operational_groups(opgroup_id = NULL)

Arguments

opgroup_id

NULL or numeric(1) [default = NULL]
the id of an operational group referenced in TAXREF

Examples

## Not run: rt_operational_groups(opgroup_id = 143)

Retrieve the list of source uses in TAXREF

Description

TAXREF references many publications across its documentation. The different sources are used for different reasons. This function returns the list of usages for a source when no arguments are provided, otherwise returns the specific type of use.

Usage

rt_source_uses(usage_id = NULL)

Arguments

usage_id

NULL or numeric(1) [default = NULL]
the id of a source use in TAXREF

Examples

## Not run: rt_source_uses(usage_id = 276)

Search a source from a term

Description

Search a source from a term

Usage

rt_sources_find_term(term = NULL)

Arguments

term

character(1) [required]
A term contained in the source

Examples

## Not run: 
rt_sources_find_term(term = "Ophrys")

## End(Not run)

Retrieve a source of taxonomic information using its id

Description

Retrieve a source of taxonomic information using its id

Usage

rt_sources_id(source_id, bibtex = FALSE)

Arguments

source_id

integer(1) [required]
an integer giving the id of the source in TAXREF

bibtex

logical(1) [default = FALSE]
should citation be returned as BibTeX?

Examples

## Not run: 
rt_sources_id(source_id = 160688, bibtex = FALSE)
rt_sources_id(source_id = 160688, bibtex = TRUE)

## End(Not run)

Search a source from a citation by fuzzy matching

Description

Search a source from a citation by fuzzy matching

Usage

rt_sources_match(citation = NULL)

Arguments

citation

character(1) [required]
A string that could partially match the citation

Examples

## Not run: 
rt_sources_match(
    paste0("Chapman, T. A. 1909. Callophrys avis a new butterfly on ",
           "southern France. The Entomologist's record and journal of ",
           "variation, 21: 130-131.")
)

## End(Not run)

Retrieve the status of all Taxa according to a Status Type

Description

Retrieve the status of all Taxa according to a Status Type

Usage

rt_status_find_type(status_id = NULL, page = 1, size = 2000)

Arguments

status_id

character(1) [required]
The identifier of status (see rt_status_type() for the list of status types)

page

integer(1) [default = 1]
The page number returned

size

integer(1) [default = 2000]
The number of lines returned per page (maximum = 2000)

See Also

the list of status types rt_status_type()

Examples

## Not run: 
# Find all taxa concerned by Habitat Directive referenced in TAXREF
rt_status_find_type("DH")

## End(Not run)

Retrieve the status of all Taxa in an Operational Group

Description

Retrieve the status of all Taxa in an Operational Group

Usage

rt_status_opgroup(opgroup_id, page = 1, size = 2000)

Arguments

opgroup_id

integer(1) [required]
identifier of the operational group (see the list of operational groups rt_operational_groups())

page

integer(1) [default = 1]
The page number returned

size

integer(1) [default = 2000]
The number of lines returned per page (maximum = 2000)

See Also

the list of operational groups rt_operational_groups()

Examples

## Not run: 
    rt_status_opgroup(opgroup_id = 706)

## End(Not run)

Retrieve Status Types Used in TAXREF

Description

If the function is provided without arguments returns the entire list of status types used in TAXREF.

Usage

rt_status_type(status_id = NULL)

Arguments

status_id

NULL or character(1) [default = NULL]
A character identifying the type of status


Retrieve Taxon ID from partially matching its Name

Description

Retrieve Taxon ID from partially matching its Name

Usage

rt_taxa_autocomplete(
  term = NULL,
  territories = NULL,
  rank = NULL,
  domain = NULL,
  page = 1,
  size = 200
)

Arguments

term

character(1) [required]
the beginning of the scientific name of the searched taxa

territories

NULL or ⁠character(1+)⁠ [default = NULL]
One or more territories where species is present:

  • "fr" = Mainland France

  • "gf" = French Guiana

  • "gua" = Guadeloupe

  • "mar" = Martinique

  • "sm" = Saint Martin

  • "sb" = Saint Barthélemy

  • "spm" = Saint Pierre and Miquelon

  • "epa" = Scattered Islands in the Indian Ocean

  • "may" = Mayotte

  • "reu" = Réunion

  • "sa" = French Southern and Antarctic Lands

  • "ta" = Adélie Land

  • "nc" = New Caledonia

  • "wf" = Wallis and Futuna

  • "pf" = French Polynesia

  • "cli" = Clipperton Island

rank

NULL or ⁠character(1+)⁠ [default = NULL]
One of more rank of the searched taxa (see rt_taxo_ranks() for the list of all ranks available):

  • Dumm= Domain

  • KD= Kingdom

  • PH= Phylum

  • CL= Class

  • OR= Order

  • FM= Family

  • SBFM= Subfamily

  • TR= Tribe

  • GN= Genus

  • AGES= Aggregate

  • ES= Species

  • SSES= Subspecies

  • NAT= Natio

  • VAR= Variety

  • SVAR= Sub-variety

  • FO= Form

  • SSFO= Sub-form

  • RACE= Race

  • CAR= Cultivar

  • AB= Abberatio

domain

NULL or character(1) [default = NULL]
The domain where the species is found:

  • "marin" = Marine

  • "continental" = Continental

page

integer(1) [default = 1]
The page number returned

size

integer(1) [default = 200]
The number of lines returned per page (maximum = 200)

See Also

the list of taxonomic ranks avaible through rt_taxo_ranks()

Examples

## Not run: 
rt_taxa_autocomplete(term = "Bradypus")

## End(Not run)

Retrieve a taxon children

Description

Retrieve a taxon children

Usage

rt_taxa_children(id)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_children(id = 442585)

Retrieve IDs of the taxon in external databases

Description

Retrieve IDs of the taxon in external databases

Usage

rt_taxa_externalids(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_externalids(id = 443800)

Get factsheet for taxa

Description

For some taxa, a factsheet has been written. This text, often in French, describes the general ecology and some diagnosis of the submitted taxon.

Usage

rt_taxa_factsheet(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Details

Beware, many taxa have no corresponding factsheet.

Examples

## Not run: rt_taxa_factsheet(4540)

Retrieve Taxon using the ids from external databases

Description

Retrieve Taxon using the ids from external databases

Usage

rt_taxa_from_externalids(external_db = NULL, external_id = NULL)

Arguments

external_db

character(1) [required]
The name of an external database see rt_external_db() for the list of external database names

external_id

character(1) [required]
The identifier of the taxon in the specified external database

See Also

rt_external_db() for the list of external databases linked to TAXREF; rt_taxa_externalids() to get the external ids associated with a taxon in TAXREF

Examples

## Not run: rt_taxa_from_externalids("TROPICOS", 26600197)

Find taxa by fuzzy matching their scientific Name

Description

Find taxa by fuzzy matching their scientific Name

Usage

rt_taxa_fuzzymatch(sciname = NULL)

Arguments

sciname

character(1) [required]
a string giving the scientific name of the taxon with or without the author name


Retrieve a taxon information using its id

Description

Retrieve a taxon information using its id

Usage

rt_taxa_id(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: 
rt_taxa_id(id = 443800)
rt_taxa_id(id = 110335)

## End(Not run)

Retrieve Interactions of taxon with other taxa

Description

Retrieve Interactions of taxon with other taxa

Usage

rt_taxa_interactions(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_interactions(id = 110335)

Retrieve Media (photos & others) Associated with a Taxon

Description

Retrieve Media (photos & others) Associated with a Taxon

Usage

rt_taxa_media(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_media(id = 443800)

Retrieve classification above the taxon

Description

Retrieve classification above the taxon

Usage

rt_taxa_parent(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_parent(id = 443800)

Retrieve Sources Associated with a Taxon

Description

Retrieve Sources Associated with a Taxon

Usage

rt_taxa_sources(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

See Also

rt_source_uses() for types of source use

Examples

## Not run: rt_taxa_sources(id = 443800)

Retrieve Taxon Conservation Status

Description

Retrieve Taxon Conservation Status

Usage

rt_taxa_status(id = NULL, detail = FALSE)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

detail

logical(1) [default = FALSE]
Should the table be a long table detailing all the statuses or a compact table?

Examples

## Not run: 
rt_taxa_status(id = 443800, detail = FALSE)
rt_taxa_status(id = 443800, detail = TRUE)

## End(Not run)

Retrieve Synonyms associated with a Taxon

Description

Retrieve Synonyms associated with a Taxon

Usage

rt_taxa_synonyms(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_synonyms(id = 107003)

Retrieve history of a taxon through TAXREF versions

Description

Retrieve history of a taxon through TAXREF versions

Usage

rt_taxa_taxrefhistory(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

Examples

## Not run: rt_taxa_taxrefhistory(id = 443800)

Retrieve VernacularNames associated with a Taxon

Description

Retrieve VernacularNames associated with a Taxon

Usage

rt_taxa_vernacular(id = NULL)

Arguments

id

integer(1) [required]
an integer giving the id of the taxon in TAXREF (also called cdNom)

See Also

rt_languages() for a list of languages referenced in TAXREF

Examples

## Not run: rt_taxa_vernacular(id = 443800)

Retrieve taxonomic ranks in TAXREF

Description

If the function is used without arguments returns the entire list of taxonomic ranks used in TAXREF.

Usage

rt_taxo_ranks(taxo_id = NULL)

Arguments

taxo_id

NULL or character(1) [default = NULL]
the id of a taxonomic rank in TAXREF.

Examples

## Not run: rt_taxo_ranks(taxo_id = "VAR")

Retrieve the list of existing TAXREF versions

Description

Retrieve the list of existing TAXREF versions

Usage

rt_taxref_versions(version_id = NULL)

Arguments

version_id

NULL or integer(1) [default = NULL]
the id of a TAXREF version

Examples

## Not run: rt_taxref_versions(version_id = 12)

Retrieve the list of vernacular groups in TAXREF

Description

This function takes no argument.

Usage

rt_vernacular_groups()