get_wiki: Get the Text of a Wikipedia Article

Description Usage Arguments Value Examples

View source: R/get_wiki.R

Description

Get the text of a wikipedia article by searching a title. For example, entering the search term "France" will return the text of the wikipedia page for France.

Usage

1
get_wiki(title, clean = TRUE)

Arguments

title

The title or (titles) of the Wikipedia page to be searched. If you would like to query multiple articles, put the titles in a character vector. The maximum number of titles that can be queried at one time is 50.

clean

Should getwiki remove html tags from the returned text?

Value

A single title will return the matched wikipedia article in a string. A vector of titles will return a dataframe with one column equal to the searched titles and one column equal to the matched article content

Examples

1
2
get_wiki("United States")
get_wiki(c("United States", "France"))

corydonbaylor/getwiki documentation built on Dec. 31, 2020, 10:07 p.m.