The Outsider is always unhappy, but he is an agent that ensures the happiness for millions of âInsidersâ.
The Outsider, Wilson, 1956.
Integrating external programs into a deployable, R workflow can be challenging. Although there are many useful functions and packages (e.g.
base::system()) for calling code and software from alternative languages, these approaches require users to independently install dependant software and may not work across platforms.
outsider aims to make this easier by allowing users to install, run and control programs outside of R across all operating systems.
Itâs like whalebrew but exclusively for R.
For more detailed information, check out the
To install the development version of the package â¦
Additionally, you will also need to install Docker desktop. To install Docker visit the Docker website and follow the instructions for your operating system: Install Docker.
Tested and functioning on Linux, Mac OS and Windows. (For some older versions of Windows, the legacy Docker Toolbox may be required instead of Docker Desktop.)
library(outsider) #> ---------------- #> outsider v 0.1.0 #> ---------------- #> - Security notice: be sure of which modules you install # outsider modules are hosted on GitHub and other code-sharing sites # this repo is a demonstration outsider module # it contains a function for printing 'Hello World!' in Ubuntu 18.04 repo <- 'dombennett/om..hello.world' module_install(repo = repo, force = TRUE) # look up the help files for the module module_help(repo = repo) # import the 'hello_world' function hello_world <- module_import(fname = 'hello_world', repo = repo) # run the imported function hello_world() #> Hello world! #> ------------ #> DISTRIB_ID=Ubuntu #> DISTRIB_RELEASE=18.04 #> DISTRIB_CODENAME=bionic #> DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
Modules available on GitHub since 15:15 16 January 2020 (CET)
â¦. Plus, at least, 10 more!
For more details, see the available modules table
Installing and running a multiple sequence alignment program (mafft).
(See âEvolutionary tree pipelineâ for running this program yourself.)
There is a risk that
outsider modules may be malicious. Modules make use of the program Docker which allows any program to be efficiently deployed by wrapping the programâs code, along with everything that program requires to run e.g.Â operating system, dependent libraries, into an executable container.
While this is useful for providing users with whichever programs they require, there is a potential security risk if, along with the desired program and dependencies, malicious software is also shipped.
A well-known malicious example of Docker container exploitation is in cryptocurrency mining. A container may ship with a cryptocurrency mining software that would make use of your computerâs resources while you ran you the module.
To minimise any security risks Be sure of which modules you install on your machine. Whenever installing a new module,
outsider will alert you to the potential security risks. Before installing a new module, ask yourself:
Consider checking the stats on the moduleâs GitHub page (e.g.Â number of stars/watchers) or looking-up the details of the developer (e.g.Â email forums, twitter, academic profile).
Additionally, you may wish to check the Dockerfile of the module. Does it install programs from well-known code repositories (e.g.Â
apt-get)? Or is it running lines of code from unknown/untrackable URL sources?
outsider makes use of the program docker which allows users to create small, deployable machines, called Docker images. The advantage of these images is that they can be run on any machine that has Docker installed, regardless of operating system. The
outsider package makes external programs available in R by facilitating the interaction between Docker and the R console through outsider modules. These modules consist of two parts: a Dockerfile that describes the Docker image that contains the external program and an R package for interacting with the Docker image. Upon installing and running a module through
outsider, a Docker image is launched and the R code of the module is used to interact with the external program. Anyone can create a module. They are hosted on GitHub as well as other code-sharing sites and can be searched for and downloaded through
Bennett et al., (2020). outsider: Install and run programs, outside of R, inside of R. Journal of Open Source Software, 5(45), 2038, https://doi.org/10.21105/joss.02038