Skip to content

Commit

Permalink
fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxo-m committed Feb 18, 2018
1 parent 8ae5e6e commit 579779c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 28 deletions.
26 changes: 13 additions & 13 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
title: "A Helpful Way to Install R Packages Hosted on GitHub"
author: Koji MAKIYAMA (@hoxo_m)
output:
md_document:
Expand All @@ -8,6 +7,8 @@ output:
keep_md: true
---

# "A Helpful Way to Install R Packages Hosted on GitHub"

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

```{r setup, include=FALSE}
Expand Down Expand Up @@ -40,8 +41,7 @@ githubinstall("PackageName")

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

## 1. Overview

## 1 Overview

Various people in the world create a growing number of R packages.
A part of the cause of it is the **devtools** package that makes it easy to develop R packages [[1]](https://www.rstudio.com/products/rpackages/devtools/).
Expand Down Expand Up @@ -107,7 +107,7 @@ githubinstall("AnomalyDetect")
githubinstall("anomaly-detection")
```

## 2. Installation
## 2 Installation

You can install the **githubinstall** package from CRAN.

Expand All @@ -126,7 +126,7 @@ The source code for **githubinstall** package is available on GitHub at

- https://github.com/hoxo-m/githubinstall.

## 3. Details
## 3 Details

The **githubinstall** package provides several useful functions.

Expand All @@ -147,7 +147,7 @@ To use these functions, first, you should load the package as follows.
library(githubinstall)
```

### 3.1. Install Packages from GitHub
### 3.1 Install Packages from GitHub

`gh_install_packages()` enables to install packages on GitHub by only package names.

Expand Down Expand Up @@ -191,7 +191,7 @@ Selection:
githubinstall("AnomalyDetection")
```

#### 3.1.1. Specify Git References (Branch, Tag, Commit and Pull Request)
#### 3.1.1 Specify Git References (Branch, Tag, Commit and Pull Request)

You can install packages by specifying Git references (branch, tag, commit and pull request).

Expand Down Expand Up @@ -229,7 +229,7 @@ For instance, you can install **dplyr** from the [pull request #2058](https://gi
gh_install_packages("dplyr", ref = github_pull("3274"))
```

### 3.2. Suggest Repositories
### 3.2 Suggest Repositories

`gh_install_packages()` prompts you to install the suggested packages.
But you may just want to know what will be suggestions.
Expand All @@ -254,7 +254,7 @@ gh_suggest_username("hadly")
gh_suggest_username("yuhui")
```

### 3.3. List the Packages
### 3.3 List the Packages

`gh_list_packages()` returns a list of R package repositories on GitHub as `data.frame`.

Expand All @@ -277,7 +277,7 @@ repos <- with(hadleyverse, paste(username, package_name, sep="/"))
githubinstall(repos) # I have not tried it
```

### 3.4. Search Packages by a Keyword
### 3.4 Search Packages by a Keyword

`gh_search_packages()` returns a list of R package repositories on GitHub that their titles contain a given keyword.

Expand All @@ -294,7 +294,7 @@ lasso_packages <- transform(gh_search_packages("lasso"), title = paste0(" ", sub
head(lasso_packages)
```

### 3.5. Show the Source Code of Functions on GitHub
### 3.5 Show the Source Code of Functions on GitHub

`gh_show_source()` looks for a source code on GitHub for a given function and tries to open the place on your Web browser.

Expand All @@ -311,7 +311,7 @@ gh_show_source(mutate)

This function may do not work well with Safari.

### 3.6. Update the List of R Packages
### 3.6 Update the List of R Packages

The **githubinstall** package uses [Gepuro Task Views](http://rpkg.gepuro.net) for getting the list of R packages on GitHub.
Gepuro Task Views is crawling the GitHub and updates information every day.
Expand All @@ -327,7 +327,7 @@ In such case, `gh_update_package_list()` is useful.
gh_update_package_list()
```

## 4. Related Work
## 4 Related Work

- 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)
Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
“A Helpful Way to Install R Packages Hosted on 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)
Expand Down Expand Up @@ -28,8 +31,8 @@ githubinstall("PackageName")
The package also provides some helpful functions for R packages hosted
on GitHub.

1. Overview
-----------
1 Overview
----------

Various people in the world create a growing number of R packages. A
part of the cause of it is the **devtools** package that makes it easy
Expand Down Expand Up @@ -106,8 +109,8 @@ githubinstall("AnomalyDetect")
githubinstall("anomaly-detection")
```

2. Installation
---------------
2 Installation
--------------

You can install the **githubinstall** package from CRAN.

Expand All @@ -126,8 +129,8 @@ The source code for **githubinstall** package is available on GitHub at

- <https://github.com/hoxo-m/githubinstall>.

3. Details
----------
3 Details
---------

The **githubinstall** package provides several useful functions.

Expand All @@ -148,7 +151,7 @@ To use these functions, first, you should load the package as follows.
library(githubinstall)
```

### 3.1. Install Packages from GitHub
### 3.1 Install Packages from GitHub

`gh_install_packages()` enables to install packages on GitHub by only
package names.
Expand Down Expand Up @@ -190,7 +193,7 @@ gh_install_packages("cats")
githubinstall("AnomalyDetection")
```

#### 3.1.1. Specify Git References (Branch, Tag, Commit and Pull Request)
#### 3.1.1 Specify Git References (Branch, Tag, Commit and Pull Request)

You can install packages by specifying Git references (branch, tag,
commit and pull request).
Expand Down Expand Up @@ -238,7 +241,7 @@ instance, you can install **dplyr** from the [pull request
gh_install_packages("dplyr", ref = github_pull("3274"))
```

### 3.2. Suggest Repositories
### 3.2 Suggest Repositories

`gh_install_packages()` prompts you to install the suggested packages.
But you may just want to know what will be suggestions.
Expand Down Expand Up @@ -278,7 +281,7 @@ gh_suggest_username("yuhui")
#> [1] "yihui"
```

### 3.3. List the Packages
### 3.3 List the Packages

`gh_list_packages()` returns a list of R package repositories on GitHub
as `data.frame`.
Expand Down Expand Up @@ -306,7 +309,7 @@ repos <- with(hadleyverse, paste(username, package_name, sep="/"))
githubinstall(repos) # I have not tried it
```

### 3.4. Search Packages by a Keyword
### 3.4 Search Packages by a Keyword

`gh_search_packages()` returns a list of R package repositories on
GitHub that their titles contain a given keyword.
Expand All @@ -327,7 +330,7 @@ head(lasso_packages)
#> 5 PNNL-Comp-Mass-Spec glmnetGLR The primary goal was to build a clas..
#> 6 PingYangChen milr multiple-instance logistic regressio..

### 3.5. Show the Source Code of Functions on GitHub
### 3.5 Show the Source Code of Functions on GitHub

`gh_show_source()` looks for a source code on GitHub for a given
function and tries to open the place on your Web browser.
Expand All @@ -346,7 +349,7 @@ gh_show_source(mutate)

This function may do not work well with Safari.

### 3.6. Update the List of R Packages
### 3.6 Update the List of R Packages

The **githubinstall** package uses [Gepuro Task
Views](http://rpkg.gepuro.net) for getting the list of R packages on
Expand All @@ -365,8 +368,8 @@ explicitly.
gh_update_package_list()
```

4. Related Work
---------------
4 Related Work
--------------

- remotes: [Install R packages from GitHub, Bitbucket, git, svn
repositories, URLs](https://github.com/MangoTheCat/remotes) [![CRAN
Expand Down

0 comments on commit 579779c

Please sign in to comment.