-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
52 lines (37 loc) · 1.88 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
library(gghalfnorm)
library(ggrepel)
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "tools/images/README-"
)
```
# gghalfnorm
> Half-Normal Plots
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![Travis-CI Build Status](https://travis-ci.org/nathaneastwood/gghalfnorm.svg?branch=master)](https://travis-ci.org/nathaneastwood/gghalfnorm) [![](http://www.r-pkg.org/badges/version/gghalfnorm)](http://www.r-pkg.org/pkg/gghalfnorm) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/gghalfnorm)](http://www.r-pkg.org/pkg/remotes) [![codecov](https://codecov.io/gh/nathaneastwood/gghalfnorm/branch/master/graph/badge.svg)](https://codecov.io/gh/nathaneastwood/gghalfnorm)
This package provides a wrapper around the [halfnorm](https://github.com/cran/faraway/blob/master/R/faraway.R#L78) function from the [faraway](https://github.com/cran/faraway) package using the ggplot2 API. The `gghalfnorm` function is the only function within the package.
## Installation
Install the latest stable release from CRAN:
```{r installCran, eval = FALSE}
install.packages("gghalfnorm")
```
Alternatively, install the latest development version from github:
```{r installGitHub, eval = FALSE}
install.packages("devtools")
devtools::install_github("nathaneastwood/gghalfnorm")
```
## Usage
```{r non_repel}
set.seed(123)
gghalfnorm(x = rnorm(100), nlab = 10)
```
The function can also make use of the `geom_text_repel` function from the [ggrepel](https://github.com/slowkow/ggrepel) package.
```{r repel}
set.seed(123)
gghalfnorm(x = rnorm(100), nlab = 10, repel = TRUE, box.padding = unit(1, "lines"))
```