Learn R Programming

taxize (version 0.9.4)

get_wiki: Get the page name for a Wiki taxon

Description

Get the page name for a Wiki taxon

Usage

get_wiki(x, wiki_site = "species", wiki = "en", ask = TRUE,
  verbose = TRUE, limit = 100, rows = NA, ...)

as.wiki(x, check = TRUE, wiki_site = "species", wiki = "en")

# S3 method for wiki as.wiki(x, check = TRUE, wiki_site = "species", wiki = "en")

# S3 method for character as.wiki(x, check = TRUE, wiki_site = "species", wiki = "en")

# S3 method for list as.wiki(x, check = TRUE, wiki_site = "species", wiki = "en")

# S3 method for numeric as.wiki(x, check = TRUE, wiki_site = "species", wiki = "en")

# S3 method for data.frame as.wiki(x, check = TRUE, wiki_site = "species", wiki = "en")

# S3 method for wiki as.data.frame(x, ...)

get_wiki_(x, verbose = TRUE, wiki_site = "species", wiki = "en", limit = 100, rows = NA, ...)

Arguments

x

(character) A vector of common or scientific names.

wiki_site

(character) Wiki site. One of species (default), pedia, commons

wiki

(character) language. Default: en

ask

logical; should get_wiki be run in interactive mode? If TRUE and more than one wiki is found for the species, the user is asked for input. If FALSE NA is returned for multiple matches.

verbose

logical; should progress be printed?

limit

(integer) number of records to return

rows

numeric; Any number from 1 to infinity. If the default NA, all rows are considered. Note that this function still only gives back a wiki class object with one to many identifiers. See get_wiki_ to get back all, or a subset, of the raw data that you are presented during the ask process.

...

Ignored

check

logical; Check if ID matches any existing on the DB, only used in as.wiki

Value

A vector of taxonomic identifiers as an S3 class. If a taxon is not found an NA is given. If more than one identifier is found the function asks for user input if ask = TRUE, otherwise returns NA. If ask=FALSE and rows does not equal NA, then a data.frame is given back, but not of the uid class, which you can't pass on to other functions as you normally can.

See get_id_details for further details including attributes and exceptions

Details

For type = pedia, we use the english language site by default. Set the language parameter for a different language site.

See Also

classification

Other taxonomic-ids: get_boldid, get_colid, get_eolid, get_gbifid, get_ids, get_iucn, get_natservid, get_nbnid, get_tolid, get_tpsid, get_tsn, get_uid, get_wormsid

Examples

Run this code
# NOT RUN {
get_wiki(x = "Quercus douglasii")
get_wiki(x = "Quercu")
get_wiki(x = "Quercu", "pedia")
get_wiki(x = "Quercu", "commons")

# diff. wikis with wikipedia
get_wiki("Malus domestica", "pedia")
get_wiki("Malus domestica", "pedia", "fr")

# as coercion
as.wiki("Malus_domestica")
as.wiki("Malus_domestica", wiki_site = "commons")
as.wiki("Malus_domestica", wiki_site = "pedia")
as.wiki("Malus_domestica", wiki_site = "pedia", wiki = "fr")
as.wiki("Malus_domestica", wiki_site = "pedia", wiki = "da")
# }

Run the code above in your browser using DataLab