[R-pkg-devel] install from github

Dirk Eddelbuettel edd at debian.org
Fri Dec 4 03:53:48 CET 2015


Berry,

Missed this this morning ...

On 3 December 2015 at 09:40, Berry Boessenkool wrote:
| is someone aware of a way to easily install a package hosted on github without using devtools::install_github?

Sure, drat can help. A couple of people use it for their packages; Mark
who already replied is among.

| Does anyone else ever need to avoid devtools?

Sure. I happen to basically never ever use devtools. 

| Would something doing that be worth a package on CRAN?

Sure, drat :)

| Optional if no,yes,yes: Is my basic idea below any good at all?

I would think so.

drat wraps around some code in base R's tools package to help _create_ a
repository, and also wraps around base R's options() to set additional
repositories.  After that, it is just install.packages() and of course
update.packages() giving you full repository flow and dependency resolution.

And as Mark already pointed out, installation will pick tarballs released
by their _authors_ rather than a random snapshot picking by chance by the
user.

The hardest part about drat is explaining. According to some people in the
room (hi, David!) I even failed at that during my six minutes at useR!.  Oh
well.  You have a couple of vignettes, my website and the github repo. Maybe
start at http://dirk.eddelbuettel.com/code/drat.html.

Cheers, Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-package-devel mailing list