Skip to content
R package to create internally consistent, mini version of CRAN
Branch: master
Clone or download
Latest commit abe1b31 Jun 22, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Added cranJuly2014 dataset Jul 1, 2014
docs Update docs Jan 15, 2018
inst misc cleanup Jan 2, 2018
tests Add .env() to with_mock() Jun 22, 2018
vignettes Bump version to 0.2.11 Jan 15, 2018
NEWS Updated NEWS and DESCRIPTION date Jun 22, 2018
_pkgdown.yml Build docs using pkgdown #105 Dec 19, 2017


Build Status Build Status CRAN RStudio mirror downloads Coverage Status

Create a mini version of CRAN containing only selected packages


At the end of 2014, CRAN consisted of more than 6,000 packages, and by 2017 this number doubled to more than 12,000. Many organisations need to maintain a private mirror of CRAN, but with only a subset of packages that are relevant to them.

The miniCRAN package makes it possible to create an internally consistent repository consisting of selected packages from CRAN-like repositories. The user specifies a set of desired packages, and miniCRAN recursively reads the dependency tree for these packages, then downloads only this subset.

Important functions:

Function Use it for
pkgDep() Find package dependencies
makeRepo() Make repository (with or without downloading packages)
addPackage() Add additonal packages (and their dependencies) to existing repository
updatePackages() Update the versions of packages currently in the repository


Get the stable version from CRAN:


Development version

Get the latest development version from github:

# Use `devtools` to install directly from github

System requirements

The miniCRAN package itself doesn't introduce any system dependencies. However, the package imports the curl and XML packages. These have system requirements on libxml2-devel, libcurl-devel and openssl-devel.

  • On systems with the rpm package manager (Red Hat, CentOS) try:

      yum install libcurl-devel libxml2-devel openssl-devel
  • On systems with the aptitude package manager (Debian, Ubuntu) try:

      apt-get install libcurl4-openssl-dev libxml2-devel openssl-devel


# Determine and download the packages `ggplot2`, `plyr` and `reshape2`, including their dependencies:

pkgs <- c("ggplot2", "plyr", "reshape2")
makeRepo(pkgDep(pkgs), path = file.path(tempdir(), "miniCRAN"))

Supported by Microsoft

I started this project while employed by Revolution Analytics and Microsoft. Microsoft has kindly agreed that I maintain the project individually, and retains copyright to all work on the project until October 2017.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.