Learn R Programming

berryFunctions (version 1.11.0)

instGit: install github package

Description

Quickly install a package from github without having to install devtools with all its dependencies.

Usage

instGit(pk, cleanup = TRUE, ...)

Arguments

pk
Character string in the from of "user/package"
cleanup
Remove downloaded zipfile and folder with source code. DEFAULT: TRUE
...
Further arguments passed to install.packages, untested so far

Details

Works only for pure R package structure repositories from the master branch. Installs package dependencies listed in 'Imports' and 'Depends', but ignores version requirements! Tested only on windows 7 with R3.2.2. Note: devtools::install_github is much more extensive! Note: drat is also much better than this quick hack. http://dirk.eddelbuettel.com/code/drat.html, https://github.com/eddelbuettel/drat, http://eddelbuettel.github.io/drat/DratForPackageAuthors.html Give your github users this code: source("https://raw.githubusercontent.com/brry/berryFunctions/master/R/instGit.R") instGit("brry/extremeStat") library(extremeStat)

See Also

funSource, install_github in each of the packages devtools, ghit, remotes

Examples

Run this code

if(FALSE){
instGit("talgalili/installr")
instGit("talgalili/installr", FALSE)
instGit("hadley/readxl")
instGit("mages/googleVis") # many dependencies!
instGit("twitter/AnomalyDetection")
instGit("yihui/knitr")
instGit("ramnathv/slidify")
instGit("jrnold/ggthemes")
}

Run the code above in your browser using DataLab