Skip to contents

The offline half of importFishbase(): parses a FishBase key description page and its questions (couplet) page, both already downloaded.

Usage

parseFishbase(
  description,
  questions,
  separateTerms = TRUE,
  usePhyloService = c("GNA", "GNR", "none", "TNRS"),
  embedImages = FALSE,
  pageUrl = "https://www.fishbase.se/keys/questions.php"
)

Arguments

description

The description page (keys/description.php): an xml_document, a file path, or a string of HTML.

questions

The questions page (keys/questions.php), in any of the same forms.

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.

pageUrl

URL of the questions page, used to resolve relative image links.

Value

A dimoose object.

Examples

if (FALSE) { # \dontrun{
parseFishbase("description.html", "questions.html", usePhyloService = "none")
} # }