Skip to contents

This function takes a list of birds species names, searches for their data in the avesperu pacakage dataset, and returns a data frame containing the relevant information for each species.

Usage

search_avesperu(splist, max_distance = 0.1)

Arguments

splist

A character vector containing the names of the species to search for.

max_distance

The maximum allowed distance for fuzzy matching of species names. Defaults to 0.1.

Value

A data frame containing the retrieved information for each species.

Details

The function allows fuzzy matching for species names with a maximum distance threshold to handle potential typos or variations in species names.

Examples


splist <- c("Falco sparverius", "Tinamus osgodi", "Crypturellus sooui",
            "Thraupisa palamarum", "Thamnophilus praecox")

search_avesperu(splist)
#>         name_submitted        accepted_name     english_name
#> 1     Falco sparverius     Falco sparverius American Kestrel
#> 2       Tinamus osgodi      Tinamus osgoodi    Black Tinamou
#> 3   Crypturellus sooui    Crypturellus soui   Little Tinamou
#> 4  Thraupisa palamarum    Thraupis palmarum     Palm Tanager
#> 5 Thamnophilus praecox Thamnophilus praecox  Cocha Antshrike
#>          spanish_name         order         family    status dist
#> 1 Cernícalo Americano Falconiformes     Falconidae Residente    0
#> 2        Perdiz Negra  Tinamiformes      Tinamidae Residente    1
#> 3        Perdiz Chica  Tinamiformes      Tinamidae Residente    1
#> 4 Tangara de Palmeras Passeriformes     Thraupidae Residente    2
#> 5     Batará de Cocha Passeriformes Thamnophilidae Residente    0