Skip to content

yoni/rbundler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rbundler

Travis CI Build

rbundler is an R package dependency management utility.

Usage

  1. Fire up R from your project directory.
  2. From the R shell:
library(rbundler)
bundle()

All dependencies will be installed into <project_root>/.Rbundle, and an <project_root>/.Renviron file will be created with the following contents:

R_LIBS_USER='.Rbundle'

Any R operations run from within this project directory will adhere to the project-speciic library and package dependencies. Note that, while this method uses the package DESCRIPTION to define dependencies, it needn't have an actual package structure. Thus, rbundler becomes a general tool for managing an R project, whether it be a simple script or a full-blown package.

For more information, run help:

library(rbundler)
help(rbundler)

Background

The R programming environment does not include a dependency management tool to facilitate project-specific dependencies. Something akin to Java's maven, Ruby's bundler, Python's virtualenv, Node's npm, etc. has been beyond the reach of R programmers. For a comprehensive analysis of dependeny versioning in R, see Possible Directions for Improving Dependency Versioning in R.

Wouldn't it be nice if one could simply check out a project and run a single command to build and test the project? The command would install any required packages into a project-specific library without affecting the global R installation. E.g.:

my_project/.Rlibs/*

Enter rbundler. It installs project dependencies into a project-specific subdirectory (e.g. <PROJECT>/.Rbundle), allowing the user to avoid using global libraries.

We've been using rbundler at Opower since October 2012, and have seen improvements in developer workflows and maintainability of internal packages. Combined with our internal package repository and Jenkins, our continous integration server, we have been able to stabilize development of a dozen or so packages for use in production applications.

About

Rbundler manages an R project's dependencies systematically and repeatedly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published