Request the record for a taxon in the World Checklist of Vascular Plants (WCVP) using the IPNI ID.

lookup_wcvp(taxonid, .wait = 0.1)

Arguments

taxonid

A string containing a valid IPNI ID.

.wait

Time to wait before making a request, to help rate limiting.

Value

A wcvp_taxon object, which is a simple structure with fields for each of the fields returned by the lookup API, as well as the the httr response object.

Details

The World Checklist of Vascular Plants (WCVP) is a global consensus view of all known vascular plant species. It has been compiled by staff at RBG Kew in consultation with plant group experts.

The taxon lookup API allows users to retrieve taxonomic information for a specific taxon name using the unique IPNI ID. If this is not known, it can be found out using the WCVP search API.

References

WCVP (2020). World Checklist of Vascular Plants, version 2.0. Facilitated by the Royal Botanic Gardens, Kew. Published on the Internet; http://wcvp.science.kew.org/

See also

Other WCVP functions: download_wcvp(), search_wcvp()

Examples


# retrieve taxonomic information for a taxon name
lookup_wcvp("271445-2")
#> <WCVP taxon id: 271445-2>
#> Name: Abbevillea chrysophylla
#> Authors: O.Berg
#> Status: synonym
#> Rank: Species
#> Accepted taxon ID: 60447743-2
#> Synonyms: 0

# print a summary of the returned information
r <- lookup_wcvp("271445-2")
print(r)
#> <WCVP taxon id: 271445-2>
#> Name: Abbevillea chrysophylla
#> Authors: O.Berg
#> Status: synonym
#> Rank: Species
#> Accepted taxon ID: 60447743-2
#> Synonyms: 0

# tidy into a tibble
r <- lookup_wcvp("271445-2")
tidy(r)
#> # A tibble: 1 × 19
#>   id       link            name   display   authors family genus specificEpithet
#>   <chr>    <chr>           <chr>  <chr>     <chr>   <chr>  <chr> <chr>          
#> 1 271445-2 /taxon/271445-2 Abbev… <i>Abbev… O.Berg  Myrta… Abbe… chrysophylla   
#> # … with 11 more variables: infraspecificEpithet <lgl>, rank <chr>,
#> #   subordinateRank <chr>, status <chr>, publication <chr>, reviewStatus <chr>,
#> #   parent <lgl>, accepted <list>, synonyms <list>, hierarchy <list>,
#> #   children <list>

# tidy the returned list of synonyms into a tibble
r <- lookup_wcvp("60447743-2")
tidied <- tidy(r)
tidyr::unnest(tidied, cols=synonyms, names_sep="_")
#> # A tibble: 11 × 27
#>    id         link   name    display      authors   family genus specificEpithet
#>    <chr>      <chr>  <chr>   <chr>        <chr>     <chr>  <chr> <chr>          
#>  1 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  2 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  3 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  4 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  5 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  6 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  7 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  8 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#>  9 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#> 10 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#> 11 60447743-2 /taxo… Campom… <b><i>Campo… (Cambess… Myrta… Camp… eugenioides    
#> # … with 19 more variables: infraspecificEpithet <lgl>, rank <chr>,
#> #   subordinateRank <chr>, status <chr>, publication <chr>, reviewStatus <chr>,
#> #   parent <list>, accepted <lgl>, synonyms_id <chr>, synonyms_fqId <chr>,
#> #   synonyms_url <chr>, synonyms_display <chr>, synonyms_accepted <lgl>,
#> #   synonyms_family <chr>, synonyms_name <chr>, synonyms_author <chr>,
#> #   synonyms_rank <chr>, hierarchy <list>, children <list>

# expand the child entries returned for each entry
r <- lookup_wcvp("30000055-2")
tidied <- tidy(r)
tidyr::unnest(tidied, cols=children, names_sep="_")
#> # A tibble: 42 × 27
#>    id         link    name    display      authors family genus  specificEpithet
#>    <chr>      <chr>   <chr>   <chr>        <chr>   <chr>  <chr>  <lgl>          
#>  1 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  2 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  3 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  4 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  5 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  6 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  7 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  8 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#>  9 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#> 10 30000055-2 /taxon… Campom… <b><i>Campo… Ruiz &… Myrta… Campo… NA             
#> # … with 32 more rows, and 19 more variables: infraspecificEpithet <lgl>,
#> #   rank <chr>, subordinateRank <chr>, status <chr>, publication <chr>,
#> #   reviewStatus <chr>, parent <lgl>, accepted <lgl>, synonyms <list>,
#> #   hierarchy <list>, children_id <chr>, children_fqId <chr>,
#> #   children_url <chr>, children_display <chr>, children_accepted <lgl>,
#> #   children_family <chr>, children_name <chr>, children_author <chr>,
#> #   children_rank <chr>