Set Up R Source Code Files for Use on Multiple Machines

When working across multiple machines and, similarly for reproducible research, it can be time consuming to ensure that you have all of the needed packages installed and loaded and that the correct working directory is set. 'simpleSetup' provides simple functions for making these tasks more straightforward.


simpleSetup

Simple Functions for Setting Up An R Source Code File For Use on Multiple Machines

CRAN Version Build Status

When working across multiple machines and, similarly for reproducible research, it can be time consuming to ensure that you have all of the needed packages installed and loaded and that the correct working directory is set. simpleSetup provides simple functions for making these tasks more straightforward.

Currently it has two functions:

  • library_install for loading packages used in a script and installing ones that are missing.

  • set_valid_wd search for and set a valid working directory from a list of possible directories.

Setup example

library(simpleSetup)

# Load packages, install if needed
packages <- c('networkD3', 'coreSim')
library_install(packages)

# Set valid working directory
possible_wd <- c('/examples/directory1', '/anotherExample/directory2')
set_valid_wd(possible_wd)

The hitch is that users will have to install the setupPkg, but this is one quick installation, as the package has no dependencies.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("simpleSetup")

0.1.0 by Christopher Gandrud, 10 years ago


Report a bug at https://github.com/christophergandrud/simpleSetup/issues


Browse source code at https://github.com/cran/simpleSetup


Authors: Christopher Gandrud [aut, cre]


Documentation:   PDF Manual  


GPL (>= 3) license



See at CRAN