Awesome
drat
Drat R Archive Template
Background
The R package ecosystem is one of the cornerstones of the success seen by R. As of this writing, over 6200 packages are on CRAN, several hundred more at BioConductor and 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 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 package documentation, or the package page for more.
Getting Started
You can install the package from CRAN (once it
will have left the incoming/
directory there) via
install.packages("drat")
after which you consult the manual pages.
Alternatively, for a first installation, you can also do
install.packages("drat", repos="http://eddelbuettel.github.io/drat")
After either initial installation, you can add line such as
drat:::add("eddelbuettel")
to your session or startup files (see help(Startup)
) and use
update.packages()
as usual---also reflection the new drat archive.
Package insertion into a repo then works by passing the package tarball
filename as an argument to insertPackage()
or its shorthand variant:
drat:::insert("drat_0.0.1.tar.gz")
You can now add, commit and push the new version. A somewhat experimental
option also exists for the insertPackage()
aka drat:::insert()
function.
Status
The package is now released onto CRAN. A few possible improvements, additions and next steps are listed in the TODO.md file.
Author
Dirk Eddelbuettel
License
GPL (>= 2)