Skip to contents

Searches the species table by common name, latin name, or eco group using SQL ILIKE pattern matching.

Usage

eco_species(
  query,
  field = c("common_name", "latin_name", "eco_group"),
  con = NULL
)

Arguments

query

A character string with SQL ILIKE wildcards (e.g., "Rainbow%").

field

Which field to search. One of "common_name", "latin_name", or "eco_group".

con

An optional DBI::DBIConnection.

Value

A tibble of matching species records.

Details

When routed to a Plumber instance (eco_server(2)), the search is forwarded as a GET request to /species?query=...&field=....

Examples

if (FALSE) { # \dontrun{
eco_species("Rainbow%")
eco_species("Oncorhynchus%", field = "latin_name")
} # }