DownloadSearchedTaxa: Download Page Content From EOL

Description Usage Arguments Details Value See Also Examples

View source: R/DownloadSearchedTaxa.R

Description

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.

Usage

1
2
DownloadEOLpages(pages, to.file=TRUE, MyKey=NULL, verbose=TRUE, ...)
DownloadSearchedTaxa(ListOfTaxa, to.file=TRUE, MyKey=NULL, exact=TRUE, verbose=TRUE, ...)

Arguments

pages

EOL page numbers to download

to.file

Whether to download data to a file

MyKey

An optional user identification key to identify yourself to EOL

verbose

An optional print statement during download

ListOfTaxa

List of EOL taxa to search and download EOL pages

exact

Should taxon name match exactly in EOL or fuzzy match

...

further arguments to be passed to DownloadEOLpages and DownloadSearchedTaxa

Details

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.

Value

Either an XML file(s) downloaded to working directory or as an R object saved in the workspace.

See Also

DownloadHierarchy

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#Download taxa files to working directory in R
## Not run: DownloadEOLpages(c(1,2,3), to.file=TRUE, MyKey)
## Not run: DownloadSearchedTaxa(c("Anolis_carolinensis", 
	"Anolis garmani"), to.file=TRUE, exact=TRUE)
## End(Not run)

#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")

Reol documentation built on May 30, 2017, 12:30 a.m.