Learn R Programming

wikiTools (version 1.2.14)

getWikiInf: Create a data.frame with Q's and descriptions of a vector of names.

Description

Create a data.frame with Q's and descriptions of a vector of names.

Usage

getWikiInf(names, number = 1, language = "en")

Value

A data frame with name, Q, label and description of the names.

Arguments

names

A vector consisting of one or more Wikidata's entry (i.e., topic or person).

number

Take the number occurrence in case there are several equal names in Wikidata.

language

The language of the Wikipedia page version. This should consist of an ISO language code (default = "en").

Author

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

Run this code
## Obtaining information in English Wikidata
names <- c("William Shakespeare", "Pedro Almodovar")
information <- getWikiInf(names)

## Obtaining information in Spanish Wikidata
if (FALSE) {
informacion <- getWikiInf(names, language="es")
}

Run the code above in your browser using DataLab