Learn R Programming

wikifacts (version 0.4.2)

wiki_define: Define a term from Wikipedia

Description

`wiki_define()` displays plaintext extract(s) of the given term(s) from ' the Wikipedia article(s).

Usage

wiki_define(term = NULL, sentences = 5L)

Arguments

term

A non-empty character string or vector giving the name(s) of the term to be searched

sentences

An integer (or whole number) giving the number of sentences to return

Value

An extract from the Wikipedia article

Examples

Run this code
# NOT RUN {
wiki_define('R (programming language)')

animals <- data.frame(name = c("dog", "cat"))
animals$definition <- wiki_define(animals$name, sentences = 1)
print(animals)
# }

Run the code above in your browser using DataLab