Introducing miniCRAN: an R package to create a private CRAN repository
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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!
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.