Back
How can I install a package that is under development directly from a github repository and once installed how can I switch between development and CRAN versions?
The specific package I am interested in installing from git is ggplot2.
To install the development version of R packages from the github repository, you can use the devtools package.
For example:
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
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
31k questions
32.8k answers
501 comments
693 users