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.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Create a mini version of CRAN containing only selected packages
Introduction
At the end of 2014, CRAN consisted of more than 6,000 packages, and by2017 this number doubled to more than 12,000. Many organisations need tomaintain a private mirror of CRAN, but with only a subset of packagesthat are relevant to them.
TheminiCRAN package makes it possible to create an internallyconsistent repository consisting of selected packages from CRAN-likerepositories. The user specifies a set of desired packages, andminiCRAN 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 additional packages (and their dependencies) to existing repository
updatePackages()
Update the versions of packages currently in the repository
Installation:
Get the stable version from CRAN:
install.packages("miniCRAN")library("miniCRAN")
Development version
Get the latest development version from github:
# Use `devtools` to install directly from githublibrary(devtools)install_github("andrie/miniCRAN")
Example:
# Determine and download the packages `ggplot2`, `plyr` and `reshape2`,# including their dependencies:library("miniCRAN")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 andMicrosoft. Microsoft has kindly agreed that I maintain the projectindividually, and retains copyright to all work on the project untilOctober 2017.
About
R package to create internally consistent, mini version of CRAN