extractWiki | R Documentation |
Extract the first paragraph of a Wikipedia article with a maximum of characters.
extractWiki(
names,
language = c("en", "es", "fr", "de", "it"),
plain = FALSE,
maximum = 1000
)
names |
A vector of names, whose entries have to be extracted. |
language |
A vector of Wikipedia's languages to look for. If the article is not found in the language of the first element, it search for the followings,. |
plain |
If TRUE, the results are delivered in plain format. |
maximum |
Number maximum of characters to be included when the paragraph is too large. |
a character vector with html formatted (or plain text) Wikipedia paragraphs.
Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/
## Obtaining information in English Wikidata
names <- c("William Shakespeare", "Pedro Almodovar")
info <- getWikiInf(names)
info$text <- extractWiki(info$label)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.