nametoWikiFrame: Convert names into a Wikipedia's iframe

View source: R/wikiTools.R

nametoWikiFrameR Documentation

Convert names into a Wikipedia's iframe

Description

Convert names into a Wikipedia's iframe

Usage

nametoWikiFrame(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 iframe to a entry or name, i.e., "Max Weber" converts into "<iframe src=\"https://es.m.wikipedia.org/wiki/Max_Weber\" width=\"100...". It also manages different the languages of Wikipedia through the abbreviated two-letter language parameter, i.e., "en" = "english".

Value

A character vector of Wikipedia's iframes.

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

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

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

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