How to install development version of R packages github repository

I have the feeling that both previous answers miss the point of your question.

Consider this:

  • You can control where to install packages via arguments to both R CMD INSTALL (via -l) and install.packages().

  • At run-time, you can control where to load packages from via .libPaths().

So it really is just a matter of setting a few variables in your .Rprofile (or alike) to control this.


via Hadley at https://github.com/hadley/ggplot2

install.packages("devtools")

library(devtools)

dev_mode(on=T)

install_github("hadley/ggplot2")

# use dev ggplot2 now

# when finished do:

dev_mode(on=F)  #and you are back to having stable ggplot2

Tags:

R

Github

Ggplot2