Skip to contents

Downloads a key from FishBase and converts it into a dimoose object. See https://www.fishbase.se/keys/allkeys.php for the list of keys and their key codes.

Usage

importFishbase(
  keycode,
  fishbaseUrl = "https://www.fishbase.se/",
  separateTerms = TRUE,
  usePhyloService = c("GNA", "GNR", "none", "TNRS"),
  embedImages = FALSE
)

Arguments

keycode

Numeric or character FishBase key code.

fishbaseUrl

Base URL of the FishBase mirror, with a trailing slash.

separateTerms

If TRUE, split each lead's character statement on ";" into one row per term.

usePhyloService

Taxonomic name resolution: "GNA" verifies terminal taxa with the Global Names verifier (taxize::gna_verifier(), requires the 'taxize' package); "none" skips resolution. "GNR" is accepted as an alias for "GNA". "TNRS" is no longer available because taxize::tnrs() is defunct.

embedImages

If TRUE, download the key's morphology images and store them base64-encoded in meta. Image URLs are always stored.

Value

A dimoose object.

See also

parseFishbase() to build a key from saved HTML pages.

Examples

if (FALSE) { # \dontrun{
sharks <- importFishbase(1)
sharks$taxa
} # }