-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
57 lines (43 loc) · 1.14 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
53
54
55
56
57
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library("ggplot2")
library("badger")
```
# gghist: Quickly draw a histogram using ggplot2
```{r, echo = FALSE, results='asis'}
cat(
badge_cran_release("gghist", "green"),
badge_cran_download("gghist", "grand-total", "green"),
badge_cran_download("gghist", "last-month", "green"),
badge_cran_download("gghist", "last-week", "green"),
badge_github_actions()
)
```
gghist is a wrapper around ggplot2's `geom_histogram()` to easily plot a histogram of a numeric vector. This is especially useful, since `qplot()` was deprecated in ggplot2 3.4.0.
## Installation
You can install the current release from CRAN via
```r
install.packages("gghist")
```
or the development version from Github via
```r
devtools::install_github("frederikziebell/gghist")
```
## Example
```{r example}
library(gghist)
x <- rnorm(100)
gghist(x)
x <- exp(rnorm(1000))
gghist(x, bins = 100, fill = "firebrick") +
scale_x_log10()
```