nametoWikiURL: Create the Wikipedia URL of a name or entry.

nametoWikiURLR Documentation

Create the Wikipedia URL of a name or entry.

Description

Create the Wikipedia URL of a name or entry.

Usage

nametoWikiURL(name, language = "en")

Arguments

name

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

language

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

Details

This function adds the Wikipedia URL to a entry or name, i.e., "Max Weber" converts into "https://es.wikipedia.org/wiki/Max_Weber". It also manages different the languages of Wikipedia thru the abbreviated two-letter language parameter, i.e., "en" = "english".

Value

A character vector of names' URLs.

Author(s)

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

Examples

## When extracting a single item;
nametoWikiURL("Computer", language = "en")

## When extracting two objetcs;
A <- c("Computer", "Operating system")
nametoWikiURL(A)

## Same when three or more items;
B <- c("Socrates", "Plato" , "Aristotle")
nametoWikiURL(B)

wikiTools documentation built on March 24, 2022, 9:05 a.m.