This R package is intended for resolving dependency issues over different computers in enterprise level.

For example, imagine a scenario where you want to create a private repository consists of your package and its dependencies. But, this can be a hard problem if we hope to manage this over multiple servers with different user group privilege. They may not be even able to have the Internet connection for some reasons.

This package aims to resolve those issues by easy-to-use APIs. The name is originated from build-essential package.

How to Install

install.packages("devtools", repos = 'http://cran.us.r-project.org')
devtools::install_github("zedoul/buildr")

Then you will have buildr, desc, devtools, miniCRAN, yaml, or some other packages in your library path. Use .libPaths() command to see where your library path is located.

Quickstart

You'll need to prepare an empty directory to store miniCRAN data.

> mkdir -p ~/dir-to-store-miniCRAN

Also, you'll need to have a DESCRIPTION file from the package that you want to prepare.

Just for quickstart demo, we will use DESCRIPTION file of buildr package.

> git clone https://github.com/zedoul/buildr.git ~/buildr
> cat ~/buildr/DESCRIPTION | more
Type: Package
Title: Build Essential
Version: 0.0.1
Date: 2016-06-14
Authors@R: c(
    person("Kim", "Seonghyun", "", "shyeon.kim@scipi.net", c("aut", "cre"))
    )

Finally, you are ready to create your own miniCRAN repository.

It will take a long time.

library(buildr)

minicran_path <- "~/dir-to-store-miniCRAN"
init_minicran(minicran_path)
desc_path <- "~/buildr/DESCRIPTION"
setup(desc_path, minicran_path)

Note that I tested it on OSX only. Feel free create tickets on GitHub if you face any issues.



zedoul/buildEssential documentation built on May 4, 2019, 10:14 p.m.