knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
wikit
with outsider
in RSearch and look up summaries of Wikipedia articles.
This
outsider
module was developed to demonstrate how any kind of program can be wrapped into a module.
library(outsider) module_install(repo = "dombennett/om..wikit") #module_help(repo = "dombennett/om..wikit")
library(outsider) wikit <- module_import(fname = 'wikit', repo = 'dombennett/om..wikit') # see all examples dinosaur_summary <- wikit('dinosaur', ncols = 80) cat(dinosaur_summary)
module_uninstall(repo='dombennett/om..wikit')
Note: the
wikit
function only has three arguments (topic, lang and ncol). Other flags described in the command-line wikit program are not avaialble.
topic
: What's the topic? E.g. "rabbit" or "KitKats in Japan"lang
: Which Wikipedia language version? Default English.ncol
: Column width of the returned text summaryLearn more by visiting Wikit's homepage
An outsider
module
Learn more at outsider website. Want to build your own module? Check out outsider.devtools
website.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.