View source: R/DownloadSearchedTaxa.R
DownloadSearchedTaxa | R Documentation |
These functions will take a string of EOL IDs or taxonomic names and search EOL database for the pages. If it finds a match, it will download the EOL page.
DownloadSearchedTaxa(ListOfTaxa, to.file = TRUE, MyKey = NULL, exact = TRUE, verbose = TRUE, ...) APItaxon(taxon) MatchTaxatoEOLID(ListOfTaxa, exact = TRUE, ...)
ListOfTaxa |
List of EOL taxa to search and download EOL pages |
to.file |
Whether to download data to a file |
MyKey |
An optional user identification key to identify yourself to EOL |
exact |
Should taxon name match exactly in EOL or fuzzy match |
verbose |
An optional print statement during download |
... |
Curl options passed on to |
taxon |
Taxon |
DownloadEOLpages
will download EOL pages based on the EOL unique identifyer
number (EOL ID). Each taxon is associated with a unique identifier. These numbers are used to
match EOL pages with hierarchy pages and keep track of taxonomic changes. If you are unsure of
these numbers you can use DownloadSearchedTaxa
, which will search for either an exact
taxonomic match (exact=TRUE) or use fuzzy name matching to catch spelling errors (exact=FALSE).
This will automatically recover the matching EOL ID and download or save the XML data
accordingly.
To generate an api key (MyKey), register with EOL and find it under your profile.
Either an XML file(s) downloaded to working directory or as an R object saved in the workspace.
DownloadHierarchy
## Not run: # Download taxa files to working directory in R DownloadEOLpages(c(1,2,3), to.file=TRUE, MyKey) DownloadSearchedTaxa(c("Anolis_carolinensis", "Anolis garmani"), to.file=TRUE, exact=TRUE) # Save data as an R object rather than download files MyTaxa <- c("Camelus dromedarius") MyEOLs <- DownloadSearchedTaxa(MyTaxa, to.file=FALSE) #save(MyEOLs, file="MyEOLs.rda") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.