Learn R Programming

taxize (version 0.2.0)

scrapenames: Resolve names using Global Names Recognition and Discovery.

Description

Uses the Global Names Recognition and Discovery service, see http://gnrd.globalnames.org/.

Usage

scrapenames(url = NULL, file = NULL, text = NULL, engine = NULL,
  unique = NULL, verbatim = NULL, detect_language = NULL,
  all_data_sources = NULL, data_source_ids = NULL, callopts = list())

Arguments

url
An encoded URL for a web page, PDF, Microsoft Office document, or image file, see examples
file
When using multipart/form-data as the content-type, a file may be sent. This should be a path to your file on your machine.
text
Type: string. Text content; best used with a POST request, see examples
engine
(optional) Type: integer, Default: 0. Either 1 for TaxonFinder, 2 for NetiNeti, or 0 for both. If absent, both engines are used.
unique
(optional) Type: boolean. If TRUE (default), response has unique names without offsets.
verbatim
(optional) Type: boolean, If TRUE (default to FALSE), response excludes verbatim strings.
detect_language
(optional) Type: boolean, When TRUE (default), NetiNeti is not used if the language of incoming text is determined not to be English. When 'false', NetiNeti will be used if requested.
all_data_sources
(optional) Type: bolean. Resolve found names against all available Data Sources.
data_source_ids
(optional) Type: string. Pipe separated list of data source ids to resolve found names against. See list of Data Sources.
callopts
Further args passed to GET

Value

  • A list of length two, first is metadata, second is the data as a data.frame.

Details

One of url, file, or text must be specified - and only one of them.

Examples

Run this code
# Get data from a website using its URL
scrapenames(url = 'http://en.wikipedia.org/wiki/Araneae')

# Scrape names from a pdf at a URL
scrapenames(url = 'http://www.mapress.com/zootaxa/2012/f/z03372p265f.pdf')

# With arguments
scrapenames(url = 'http://www.mapress.com/zootaxa/2012/f/z03372p265f.pdf',
unique=TRUE)
scrapenames(url = 'http://www.mapress.com/zootaxa/2012/f/z03372p265f.pdf', all_data_sources=TRUE)

# Get data from a file - NOT WORKING YET
scrapenames(file = '~/github/sac/joshwork/species_for_Scott.txt')

# Get data from text string as an R object
scrapenames(text='A spider named Pardosa moesta Banks, 1892')

Run the code above in your browser using DataLab