Skip to content

Commit

Permalink
Merge pull request #36 from hoxo-m/use_mockr
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
hoxo-m committed Feb 18, 2018
2 parents ce573cf + bcb3f5c commit ad70016
Show file tree
Hide file tree
Showing 17 changed files with 121 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ r:
- release
- devel

r_packages:
- devtools

r_github_packages:
- jimhester/covr

Expand Down
6 changes: 2 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: githubinstall
Type: Package
Version: 0.2.1.9002
Version: 0.2.1.9003
Title: A Helpful Way to Install R Packages Hosted on GitHub
Description: Provides an helpful way to install packages hosted on GitHub.
Authors@R: c(
Expand All @@ -21,12 +21,10 @@ Imports:
jsonlite,
mockery,
utils
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
Encoding: UTF-8
Suggests:
testthat,
ggplot2,
lubridate,
knitr,
rmarkdown
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Bug fix

- Fixes crashing with repositories named NA. (#32)
- Use `mockery::stub` instead of `testthat::mock_with` for CRAN check error (#35)

# githubinstall 0.2.1

Expand Down
31 changes: 23 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,26 @@ knitr::opts_chunk$set(
```

[![Travis-CI Build Status](https://travis-ci.org/hoxo-m/githubinstall.svg?branch=master)](https://travis-ci.org/hoxo-m/githubinstall)
[![CRAN Version](http://www.r-pkg.org/badges/version/githubinstall)](https://cran.r-project.org/package=githubinstall)
[![CRAN Version](http://www.r-pkg.org/badges/version-ago/githubinstall)](https://cran.r-project.org/package=githubinstall)
[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/githubinstall)](http://cranlogs.r-pkg.org/badges/githubinstall)
[![Coverage Status](https://coveralls.io/repos/github/hoxo-m/githubinstall/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/githubinstall?branch=master)

## Abstract

The **githubinstall** package provides a function `githubinstall` to install R packages hosted on GitHub without developer's name.

```{r eval=FALSE}
githubinstall("PackageName")
```

There is the `install_github` function in the **devtools** package and the **remotes** package. But they request developer's name.

```{r eval=FALSE}
install_github("DeveloperName/PackageName")
```

The **githubinstall** package also provides some helpful functions for R packages hosted on GitHub.

## 1. Overview

A growing number of R packages are created by various people in the world.
Expand Down Expand Up @@ -272,7 +288,7 @@ gh_search_packages("lasso")
```

```{r echo=FALSE}
transform(gh_search_packages("lasso"), title = paste0(" ", substr(title, 1, 35), ".."))
transform(gh_search_packages("lasso"), title = paste0(" ", substr(title, 1, 24), ".."))
```

### 3.5. Show the Source Code of Functions on GitHub
Expand Down Expand Up @@ -310,9 +326,8 @@ gh_update_package_list()

## 4. Related Work

- berryFunctions: [Function Collection Related to Plotting and Hydrology](https://github.com/brry/berryFunctions) [![CRAN Version](http://www.r-pkg.org/badges/version/berryFunctions)](https://cran.r-project.org/package=berryFunctions)
- devtools: [Tools to make an R developer's life easier](https://github.com/hadley/devtools) [![CRAN Version](http://www.r-pkg.org/badges/version/devtools)](https://cran.r-project.org/package=devtools)
- ghit: [Lightweight GitHub Package Installer](https://github.com/cloudyr/ghit) [![CRAN Version](http://www.r-pkg.org/badges/version/ghit)](https://cran.r-project.org/package=ghit)
- drat: [Drat R Archive Template](https://github.com/eddelbuettel/drat) [![CRAN Version](http://www.r-pkg.org/badges/version/drat)](https://cran.r-project.org/package=drat)
- pacman: [A package management tools for R](https://github.com/trinker/pacman) [![CRAN Version](http://www.r-pkg.org/badges/version/pacman)](https://cran.r-project.org/package=pacman)
- remotes: [Install R packages from GitHub, Bitbucket, git, svn repositories, URLs](https://github.com/MangoTheCat/remotes) [![CRAN Version](http://www.r-pkg.org/badges/version/remotes)](https://cran.r-project.org/package=remotes)
- remotes: [Install R packages from GitHub, Bitbucket, git, svn repositories, URLs](https://github.com/MangoTheCat/remotes) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/remotes)](https://cran.r-project.org/package=remotes)
- ghit: [Lightweight GitHub Package Installer](https://github.com/cloudyr/ghit) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/ghit)](https://cran.r-project.org/package=ghit)
- pacman: [A package management tools for R](https://github.com/trinker/pacman) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/pacman)](https://cran.r-project.org/package=pacman)
- drat: [Drat R Archive Template](https://github.com/eddelbuettel/drat) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/drat)](https://cran.r-project.org/package=drat)
- devtools: [Tools to make an R developer's life easier](https://github.com/hadley/devtools) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/devtools)](https://cran.r-project.org/package=devtools)
123 changes: 90 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
# A Helpful Way to Install R Packages Hosted on GitHub
Koji MAKIYAMA (@hoxo_m)
---
title: "A Helpful Way to Install R Packages Hosted on GitHub"
author: Koji MAKIYAMA (@hoxo_m)
output:
html_document:
keep_md: true
md_document:
variant: markdown_github
---

<!-- README.md is generated from README.Rmd. Please edit that file -->



[![Travis-CI Build Status](https://travis-ci.org/hoxo-m/githubinstall.svg?branch=master)](https://travis-ci.org/hoxo-m/githubinstall)
[![CRAN Version](http://www.r-pkg.org/badges/version/githubinstall)](https://cran.r-project.org/package=githubinstall)
[![CRAN Version](http://www.r-pkg.org/badges/version-ago/githubinstall)](https://cran.r-project.org/package=githubinstall)
[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/githubinstall)](http://cranlogs.r-pkg.org/badges/githubinstall)
[![Coverage Status](https://coveralls.io/repos/github/hoxo-m/githubinstall/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/githubinstall?branch=master)

## Abstract

The **githubinstall** package provides a function `githubinstall` to install R packages hosted on GitHub without developer's name.


```r
githubinstall("PackageName")
```

There is the `install_github` function in the **devtools** package and the **remotes** package. But they request developer's name.


```r
install_github("DeveloperName/PackageName")
```

The **githubinstall** package also provides some helpful functions for R packages hosted on GitHub.

## 1. Overview

A growing number of R packages are created by various people in the world.
Expand Down Expand Up @@ -231,11 +256,17 @@ gh_suggest("AnomalyDetection")

```r
gh_suggest("cats")
#> [1] "amurali2/cats" "danielwilhelm/cats"
#> [3] "davidluizrusso/cats" "hilaryparker/cats"
#> [5] "jonathanelee1993/cats" "lloydlow/cats"
#> [7] "lolibear/cats" "oliviergimenez/cats"
#> [9] "rafalszota/cats" "tahir275/cats"
#> [1] "Kkm5/cats" "amurali2/cats"
#> [3] "briglx/cats" "danielwilhelm/cats"
#> [5] "davidluizrusso/cats" "fadiphi/cats"
#> [7] "germayneng/cats" "hilaryparker/cats"
#> [9] "jonathanelee1993/cats" "lloydlow/cats"
#> [11] "lolibear/cats" "mfabla/cats"
#> [13] "nkatiyar/cats" "oliviergimenez/cats"
#> [15] "piyush-kgp/cats" "rafalszota/cats"
#> [17] "riteekteek/cats" "sunstat/cats"
#> [19] "tahir275/cats" "thackl/cats"
#> [21] "tomis9/cats" "verreet/cats"
```

Also, `gh_suggest_username()` is useful when you want to know usernames from a faint memory.
Expand Down Expand Up @@ -267,12 +298,12 @@ head(hadleyverse)

```
#> username package_name title
#> 1 hadley assertthat User friendly assertions for R
#> 2 hadley babynames An R package contain all baby names data from the
#> 3 hadley bigrquery An interface to Google's bigquery from R.
#> 4 hadley bookdown Watch
#> 5 hadley clusterfly An R package for visualising high-dimensional clus
#> 6 hadley decumar An alternative to sweave
#> 1 hadley RcppDateTime
#> 2 hadley S3 Helpers for Programming with the S3 Object System
#> 3 hadley assertthat User friendly assertions for R
#> 4 hadley babynames An R package contain all baby names data from the
#> 5 hadley bench Bechmarking tools for R
#> 6 hadley bigrquery An interface to Google's bigquery from R.
```

By using the result, you can install all packages created by hadley.
Expand All @@ -296,19 +327,46 @@ gh_search_packages("lasso")


```
#> username package_name title
#> 1 ChingChuan-Chen milr multiple-instance logistic regressi..
#> 2 ManuSetty SeqGL SeqGL is a group lasso based algori..
#> 3 YaohuiZeng biglasso Big Lasso: Extending Lasso Model Fi..
#> 4 huayingfang CCLasso CCLasso: Correlation Inference for ..
#> 5 mlampros FeatureSelection Feature Selection in R using glmnet..
#> 6 pnnl glmnetLRC Lasso and Elastic-Net Logistic Regr..
#> 7 statsmaths genlasso Path algorithm for generalized lass..
#> 8 vincent-dk logitsgl Fit Logistic Regression with Multi-..
#> 9 vincent-dk lsgl Linear Multiple Output Using Sparse..
#> 10 vincent-dk msgl High Dimensional Multiclass Classif..
#> 11 vstanislas GGEE R Package for the Group Lasso Gene-..
#> 12 zdk123 BatchStARS R package for Stability Approach to..
#> username package_name title
#> 1 CY-dev sparseSVM Solution Paths of Sparse..
#> 2 ChingChuan-Chen milr multiple-instance logist..
#> 3 FrankD fuser Fused lasso for high-dim..
#> 4 ManuSetty SeqGL SeqGL is a group lasso b..
#> 5 PNNL-Comp-Mass-Spec glmnetGLR The primary goal was to ..
#> 6 PingYangChen milr multiple-instance logist..
#> 7 TaddyLab gamlr Gamma lasso regression..
#> 8 ToshihiroIguchi elasticnet Elastic Net, Lasso and R..
#> 9 YaohuiZeng bigSVM Solution Paths of Sparse..
#> 10 YaohuiZeng biglasso biglasso: Extending Lass..
#> 11 Zelazny7 rulefit Fit Lasso model to binar..
#> 12 annafil FFCRegressionImputation Several predictive appro..
#> 13 antiphon glbinc Grouped Lasso (and maybe..
#> 14 anuf lassoSparkR A R package that impleme..
#> 15 benkeser halplus Nonparametric regression..
#> 16 emeryyi gglasso Automatically exported f..
#> 17 esmucler mmlasso R Package to calculate t..
#> 18 gabriellajg ClussCluster This package implements ..
#> 19 huayingfang CCLasso CCLasso: Correlation Inf..
#> 20 jakmes onlineVAR R package to adaptively ..
#> 21 jcbeer fsgl R package with functions..
#> 22 jeffwong glmnet R package glmnet for est..
#> 23 katokohaku AlternateLasso R package for Lasso feat..
#> 24 maryclare powopt Little R package for per..
#> 25 mlampros FeatureSelection Feature Selection in R u..
#> 26 pnnl glmnetLRC Lasso and Elastic-Net Lo..
#> 27 rauschenberger palasso Pairwise-adaptive lasso..
#> 28 road2stat OHPL Ordered Homogeneity Purs..
#> 29 road2stat ohpl Ordered Homogeneity Purs..
#> 30 shadowmoon1988 SLASSO Sequential Lasso R Packa..
#> 31 statsmaths genlasso Path algorithm for gener..
#> 32 tshmak lassosum LASSO for GWAS with summ..
#> 33 vincent-dk msgl High Dimensional Multicl..
#> 34 vincent-dk rcsgl regression via sparse gr..
#> 35 vincent-dk sglOptim Fast Generic Solver for ..
#> 36 vstanislas GGEE R Package for the Group ..
#> 37 wrbrooks adalasso Adaptive lasso for logis..
#> 38 wrbrooks adapt Adaptive lasso for linea..
#> 39 zdk123 BatchStARS R package for Stability ..
```

### 3.5. Show the Source Code of Functions on GitHub
Expand Down Expand Up @@ -349,9 +407,8 @@ gh_update_package_list()

## 4. Related Work

- berryFunctions: [Function Collection Related to Plotting and Hydrology](https://github.com/brry/berryFunctions) [![CRAN Version](http://www.r-pkg.org/badges/version/berryFunctions)](https://cran.r-project.org/package=berryFunctions)
- devtools: [Tools to make an R developer's life easier](https://github.com/hadley/devtools) [![CRAN Version](http://www.r-pkg.org/badges/version/devtools)](https://cran.r-project.org/package=devtools)
- ghit: [Lightweight GitHub Package Installer](https://github.com/cloudyr/ghit) [![CRAN Version](http://www.r-pkg.org/badges/version/ghit)](https://cran.r-project.org/package=ghit)
- drat: [Drat R Archive Template](https://github.com/eddelbuettel/drat) [![CRAN Version](http://www.r-pkg.org/badges/version/drat)](https://cran.r-project.org/package=drat)
- pacman: [A package management tools for R](https://github.com/trinker/pacman) [![CRAN Version](http://www.r-pkg.org/badges/version/pacman)](https://cran.r-project.org/package=pacman)
- remotes: [Install R packages from GitHub, Bitbucket, git, svn repositories, URLs](https://github.com/MangoTheCat/remotes) [![CRAN Version](http://www.r-pkg.org/badges/version/remotes)](https://cran.r-project.org/package=remotes)
- remotes: [Install R packages from GitHub, Bitbucket, git, svn repositories, URLs](https://github.com/MangoTheCat/remotes) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/remotes)](https://cran.r-project.org/package=remotes)
- ghit: [Lightweight GitHub Package Installer](https://github.com/cloudyr/ghit) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/ghit)](https://cran.r-project.org/package=ghit)
- pacman: [A package management tools for R](https://github.com/trinker/pacman) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/pacman)](https://cran.r-project.org/package=pacman)
- drat: [Drat R Archive Template](https://github.com/eddelbuettel/drat) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/drat)](https://cran.r-project.org/package=drat)
- devtools: [Tools to make an R developer's life easier](https://github.com/hadley/devtools) [![CRAN Version](http://www.r-pkg.org/badges/version-ago/devtools)](https://cran.r-project.org/package=devtools)
1 change: 0 additions & 1 deletion man/gh_install_packages.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/gh_list_packages.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/gh_search_packages.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/gh_show_source.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/gh_suggest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/gh_suggest_username.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/gh_update_package_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/recommend_dependencies.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/remove_conflict_repos.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/select_repository.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/separate_into_package_and_reference.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad70016

Please sign in to comment.