'Drat' R Archive Template

Creation and use of R Repositories via helper functions to insert packages into a repository, and to add repository information to the current R session. Two primary types of repositories are support: gh-pages at GitHub, as well as local repositories on either the same machine or a local network. Drat is a recursive acronym: Drat R Archive Template.

Drat R Archive Template

The R package ecosystem is one of the cornerstones of the success seen by R. As of early 2016, almost 8000 packages are on CRAN, with about one thousand more at BioConductor and probably another hundred at OmegaHat.

Support for multiple repositories is built deeply into R; mostly via the (default) package utils. The update.packages function (along with several others from the utils package) can be used with ease for these three default repositories as well as many others. But it seemed that support for simple creation and use of local repositories was missing.

Drat tries to help here and supports two principal modes:

  • GitHub by leveraging gh-pages
  • Other repos by using other storage where you can write and provide html access

See the next section about to get started, the package documentation, the drat package page or the blog section on drat for more.

You can install the package from CRAN via the standard install.packages("drat"). Alternatively, you can also do

install.packages("drat", repos="http://eddelbuettel.github.io/drat")

to install directly from the drat repository.

See the vignettes

for the FAQ, two principal uses cases, basic motivation and an overview / introduction. The package documentation provides more details. The drat package page has a longer tutorial, and the blog section on drat has even more.

The package has been available from CRAN since the Spring of 2015 and starting to get some use. Possible improvements, additions and next steps are listed in the TODO.md file.

A few drat repositories are starting to appear (besides this one). An incomplete list (looking at the direct forks as well as GitHub search):

The rOpenSci project uses drat to distribute their code and has written a nice blog post about it.

Colin Gillespie has started to integrate Travis CI with drat, see his dratTravis repository for more details, and the contributed vignette Combining Drat and Travis

Dirk Eddelbuettel, with contributions by Carl Boettiger, Sebastian Gibb, Colin Gillespie, Matt Jones, Thomas Leeper, Steven Pav and Jan Schulz.

GPL (>= 2)


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.4 by Dirk Eddelbuettel, 6 hours ago


Report a bug at https://github.com/eddelbuettel/drat/issues

Browse source code at https://github.com/cran/drat

Authors: Dirk Eddelbuettel with contributions by Carl Boettiger, Neal Fultz, Sebastian Gibb, Colin Gillespie, Jan Górecki, Matt Jones, Thomas Leeper, Steven Pav and Jan Schulz.

Documentation:   PDF Manual  

GPL (>= 2) license

Imports utils

Suggests git2r, knitr, rmarkdown

Suggested by docuSignr.

See at CRAN