Build status
R package to create internally consistent, mini version of CRAN
At the end of 2013, CRAN consisted of more than 5000 packages. Many organisations need to maintain a private mirror of CRAN, but with only a subset of packages that are relevant to them.
miniCRAN
makes this possible by recursively reading the dependency tree for a given set of packages, then downloading only this subset.
- Find package dependencies:
pkgDep()
- Make repository (with or without downloading packages):
makeRepo()
Get the stable version from CRAN:
install.packages("miniCRAN")
library("miniCRAN")
Get a development version from github:
# Use `devtools` to install directly from github
library(devtools)
install_github("miniCRAN", username="andrie")
# Determine and download the packages `ggplot2`, `plyr` and `reshape2`, including their dependencies:
library("miniCRAN")
pkgs <- c("ggplot2", "plyr", "reshape2")
pkgDep(pkgs)
pth <- file.path(tempdir, "miniCRAN")
makeRepo(pkgDep(pkgs), path=pth, download=TRUE)