nametoWikiHtml {wikiTools}R Documentation

Create the Wikipedia link of a name or entry.

Description

Create the Wikipedia link of a name or entry.

Usage

nametoWikiHtml(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's html link to a entry or name, i.e., "Max Weber" converts into "⁠<a href='https://es.wikipedia.org/wiki/Max_Weber' target='_blank'>Max Weber</a>⁠". It also manages different the languages of Wikipedia through the abbreviated two-letter language parameter, i.e., "en" = "english".

Value

A character vector of names' links.

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;
nametoWikiHtml("Computer", language = "en")

## When extracting two objetcs;
A <- c("Computer", "Operating system")
nametoWikiHtml(A)
B <- c("Socrates", "Plato","Aristotle" )
nametoWikiHtml(B)

[Package wikiTools version 1.2.4 Index]