Introducing miniCRAN: an R package to create a private CRAN repository

October 3, 2014
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

by Andrie deVries

One of the reasons that R is so popular is the CRAN archive of useful packages. However, with more than 5,900 packages on CRAN, many organisations need to maintain a private mirror of CRAN with only a subset of packages that are relevant to them.

The package miniCRAN makes this possible by determining the dependency tree for a given set of packages, then downloading all of the package dependencies. (My previous post showed how to do this.)

There are many reasons for not creating a complete mirror CRAN using rsync:

  • You may wish to mirror only a subset of CRAN, for security, legal compliance or any other in-house reason
  • You may wish to restrict internal package use to a subset of public packages, to minimize package duplication, or other reasons of coding standards
  • You may wish to make packages available from public repositories other than CRAN, e.g. BioConductor, r-forge, OmegaHat, etc.
  • You may wish to add custom in-house packages to your repository

The ambition of miniCRAN is to eventually satisfy many of these considerations. For example, the github version of miniCRAN already allows you to draw a dependency graph using packages on CRAN as well as github. In due course we plan to extend the package to also download packages from any public repository or private file location, as well as github packages. 

Where to get miniCRAN

You can find miniCRAN on CRAN.  To install the package, use 

install.packages("miniCRAN")
library("miniCRAN")

An Overview of miniCRAN

During September  gave a presentation about miniCRAN at the first EARL conference in London: 

 

miniCRAN example

For more information about miniCRAN, take a look at this Introduction to using miniCRAN. To suggest improvements or other features, please visit my miniCRAN page on GitHub. I hope you find it useful!

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)