Title: Catalogue of the Timber Forest Species of the Peruvian Amazon
Version: 0.1.0
Description: Access the data of the 'Catalogue of the Timber Forest Species of the Peruvian Amazon' Vásquez Martínez, R., & Rojas Gonzáles, R.D.P.(2022)<doi:10.21704/rfp.v37i3.1956>.
License: MIT + file LICENSE
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.2.3
Depends: R (≥ 3.5.0)
URL: https://github.com/PaulESantos/perutimber, https://paulesantos.github.io/perutimber/
BugReports: https://github.com/PaulESantos/perutimber/issues
LazyData: true
LazyDataCompression: xz
Imports: lifecycle
Maintainer: Paul E. Santos Andrade <paulefrens@gmail.com>
NeedsCompilation: no
Packaged: 2023-09-20 00:33:24 UTC; user
Author: Paul E. Santos Andrade ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2023-09-20 13:20:02 UTC

perutimber: Catalogue of the Timber Forest Species of the Peruvian Amazon

Description

Access the data of the 'Catalogue of the Timber Forest Species of the Peruvian Amazon' Vásquez Martínez, R., & Rojas Gonzáles, R.D.P.(2022)doi:10.21704/rfp.v37i3.1956.

Author(s)

Maintainer: Paul E. Santos Andrade paulefrens@gmail.com (ORCID)

See Also

Useful links:


The matching algorithm

Description

The matching algorithm

Usage

.match_algorithm(
  splist_class,
  max_distance,
  progress_bar = FALSE,
  keep_closest = TRUE,
  genus_fuzzy = TRUE,
  grammar_check = FALSE
)

Get perutimber data

Description

This function takes a species list and tries to match a name in the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga, subseting information for each species. If the name_submitted is a valid name, it will be the duplicated in accepted_name column, else the accepted_name column will display the closest name given the maximum distance defined in max_distance

Usage

get_perutimber_data(splist, max_distance = 0.2)

Arguments

splist

A character vector specifying the input taxon, each element including genus and specific epithet and, potentially, infraspecific rank, infraspecific name and author name. Only valid characters are allowed (see base::validEnc).

max_distance

match when comparing the submitted name with the closest name matches in the species listed in the "Catalogue of the timber forest species of the Amazon and the Peruvian Yunga". The distance used is a generalized Levenshtein distance that indicates the total number of insertions, deletions, and substitutions allowed to match the two names. It can be expressed as an integer or as the fraction of the binomial name. For example, a name with length 10, and a max_distance = 0.1, allow only one change (insertion, deletion, or substitution). A max_distance = 2, allows two changes.

Value

A table with the accepted name and catalog data of the species.

Examples

splist <- c("Euterpe precatoria var. precatorio",
            "Welfia alfredi",
            "Hibiscus abelmoschus var. betulifolius")
get_perutimber_data(splist)


List of Plant Species Name and information from the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga.

Description

The 'perutimber_dat' contains information from the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga.

Usage

perutimber_data

Format

A tibble with the following columns:

accepted_name

A character vector. The list of the accepted plant taxa names according to the Taxonomic Name Resolution Service - TNRS.

accepted_name_author

A character vector. The corresponding author name of the accepted_name, staying empty if the taxonomic_status is "Synonym" or "No opinion".

accepted_family

A character vector. The corresponding family name of the accepted_name.

common_name

A character vector. Listed all common names for each species.

accepted_name_rank

A character vector. Information about infraspecific status.

habit

A character vector.

plant_height_m

A character vector. The plant height range in meters.

regions

A character vector.

elevation

A character vector.

uses

A character vector.

Examples


data(perutimber_data)
str(perutimber_data)

List of species name in tab_perutimber separeted by category

Description

The 'perutimber_sps_class' includes all species separeted by genus, epithet, author, subspecies, variety, and id (position in the tab_perutimber).

Usage

perutimber_sps_class

Format

A data.frame.

Examples


data(perutimber_sps_class)


Search species name present in the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga

Description

This function takes a species list and tries to match a name in the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga, checking if the name is listed in tha dataset.

Usage

search_perutimber(splist, max_distance = 0.2)

Arguments

splist

A character vector specifying the input taxon, each element including genus and specific epithet and, potentially, infraspecific rank, infraspecific name and author name. Only valid characters are allowed (see base::validEnc).

max_distance

match when comparing the submitted name with the closest name matches in the species listed in the "Catalogue of the timber forest species of the Amazon and the Peruvian Yunga". The distance used is a generalized Levenshtein distance that indicates the total number of insertions, deletions, and substitutions allowed to match the two names. It can be expressed as an integer or as the fraction of the binomial name. For example, a name with length 10, and a max_distance = 0.1, allow only one change (insertion, deletion, or substitution). A max_distance = 2, allows two changes.

Value

A character vector that can have three different output values. The first value, "Present," indicates whether the species name is fully matched with the names listed in the 'Catalogue of the timber forest species of the Amazon and the Peruvian Yunga'. The second value, "P_updated_name," provides a fuzzy matching of species names. If a species name is not listed in the catalogue, the third value returned will be an empty string.

Examples


# Search for multiple species vector
splist <- c("Euterpe precatoria var. precatorio",
            "Welfia alfredi",
            "Hibiscus abelmoschus var. betulifolius")
get_perutimber_data(splist)

# Search for multiple species data.frame
# base
df_splist <- data.frame(splist = splist)
df_splist$peutimber <- search_perutimber(df_splist$splist)


Search plant names according to the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga.

Description

Allow plant search plant taxa names listed in the "Catalogue of the timber forest species of the Amazon and the Peruvian Yunga". Connects to the data listed in the catalog and validates if species its present, removing orthographic errors in plant names.

Usage

search_pt(
  splist,
  max_distance = 0.2,
  show_correct = FALSE,
  genus_fuzzy = FALSE,
  grammar_check = FALSE,
  progress_bar = FALSE
)

Arguments

splist

A character vector specifying the input taxon, each element including genus and specific epithet and, potentially, infraspecific rank, infraspecific name and author name. Only valid characters are allowed (see base::validEnc).

max_distance

match when comparing the submitted name with the closest name matches in the species listed in the "Catalogue of the timber forest species of the Amazon and the Peruvian Yunga". The distance used is a generalized Levenshtein distance that indicates the total number of insertions, deletions, and substitutions allowed to match the two names. It can be expressed as an integer or as the fraction of the binomial name. For example, a name with length 10, and a max_distance = 0.1, allow only one change (insertion, deletion, or substitution). A max_distance = 2, allows two changes.

show_correct

If TRUE, a column is added to the final result indicating whether the binomial name was exactly matched (TRUE), or if it is misspelled (FALSE).

Details

The function tries to match a names in the "Catalogue of the timber forest species of the Amazon and the Peruvian Yunga", which has a corresponding accepted valid name (accepted_name). If the input name is a valid name, it will be the duplicated in accepted_name column.

The algorithm will first try to exactly match the binomial names provided in splist. If no match is found, it will try to find the closest name given the maximum distance defined in max_distance. Note that only binomial names with valid characters are allowed in this function.

Value

A data frame See perutimber::tab_perutimber for more details.

References

Vásquez Martínez and Rojas Gonzáles (2022) titled "Catálogo de las especies forestales maderables de la Amazonía y la Yunga Peruana" in Revista Forestal del Perú 37(3, Número Especial): 5-138 https://revistas.lamolina.edu.pe/index.php/rfp/article/view/1956.


List of Plant Species Name accordingly with the Catalogue of the timber forest species of the Amazon and the Peruvian Yunga.

Description

The 'tab_perutimber' contains records belonging to all the timber forest species the Amazon and the Peruvian Yunga.

Usage

tab_perutimber

Format

A tibble with the following columns:

id_cat

The fixed species id of the input taxon in Catalogue of the timber forest species of the Amazon and the Peruvian Yunga - CTSAPY.

input_genus

A character vector. The input genus of the corresponding species name listed in CTSAPY.

input_epitheton

A character vector. The specific epithet of the corresponding species name listed in CTSAPY.

rank

A character vector. The taxonomic rank: "species","subspecies", "variety", of the corresponding species name listed in CTSAPY.

input_subspecies_epitheton

A character vector. If the indicated rank is below species, the subspecies epithet input of the corresponding species name listed in CTSAPY.

taxonomic_status

A character vector. description if a taxon is classified as ‘accepted’, ‘synonym’, ‘no opinion’. According to the Taxonomic Name Resolution Service - TNRS.

accepted_name

A character vector. The list of the accepted plant taxa names according to the Taxonomic Name Resolution Service - TNRS.

accepted_family

A character vector. The corresponding family name of the accepted_name.

accepted_name_author

A character vector. The corresponding author name of the accepted_name, staying empty if the taxonomic_status is "Synonym" or "No opinion".

tnrs_name_id

A character vector. The accepted_name_id according to the Taxonomic Name Resolution Service - TNRS output.

accepted_name_url

A character vector. The accepted_name information url.

source

A character vector. The accepted_name information source.

References

Catalogue of the timber forest species of the Amazon and the Peruvian Yunga. Boyle, B. L., Matasci, N., Mozzherin, D., Rees, T., Barbosa, G. C., Kumar Sajja, R., & Enquist, B. J. (2021). Taxonomic Name Resolution Service, version 5.0. In Botanical Information and Ecology Network. https://tnrs.biendata.org/ , Accessed Mar 21, 2023.

Examples


data(tab_perutimber)
str(tab_perutimber)


List of the number positions of the first 3 letters of the species name in the tab_perutimber

Description

The 'tab_perutimber_position' reports the position (in term of number of rows) of the first three letters (triphthong) for the plant names stored in the variable 'accepted_name' of the table 'tab_perutimber'. This indexing system speeds up of the search on the largest list using the package.

Usage

tab_perutimber_position

Format

A data frame with 399 observations on the following 3 variables.

position

A character vector. It is the position of the first 3 letters of the species name in the tab_perutimber.

triphthong

A character vector. First 3 letters of the species name in the tab_perutimber.

genus

A character vector. Corresponding Genus name.

Examples


data(tab_perutimber_position)
str(tab_perutimber_position)