-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.Rmd
105 lines (76 loc) · 2.71 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
output:
md_document:
variant: gfm
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# ggstar: star layer for ggplot2
```{r, echo=FALSE, results="hide", message=FALSE}
library(badger)
```
<img src="https://github.com/xiangpin/ggstar/blob/master/inst/extdata/ggstar.png" height="200" align="right" />
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggstar?color=green)](https://cran.r-project.org/package=ggstar)
<!-- r badge_devel("xiangpin/ggstar", "green") -->
[![](https://cranlogs.r-pkg.org/badges/grand-total/ggstar?color=green)](https://cran.r-project.org/package=ggstar)
[![](https://cranlogs.r-pkg.org/badges/ggstar?color=green)](https://cranlogs.r-pkg.org/downloads/total/last-month/ggstar)
[![](https://cranlogs.r-pkg.org/badges/last-week/ggstar?color=green)](https://cranlogs.r-pkg.org/downloads/total/last-week/ggstar)
```{r, comment="", echo=FALSE, results='asis'}
cat(packageDescription('ggstar')$Description)
```
# :writing_hand: Author
[Shuangbin Xu](https://github.com/xiangpin)
School of Basic Medical Sciences, Southern Medical University
# :arrow_double_down: Installation
Get the released version from `CRAN`:
```r
install.packages("ggstar")
```
Or the development version from `github`:
```r
if (!requireNamespace("devtools", quietly=TRUE))
install.packages("devtools")
devtools::install_github("xiangpin/ggstar")
```
# :beginner: Usage
Total starshapes:
![](./inst/extdata/starshapes.png)
```{r, eval=FALSE, echo=FALSE}
library(ggplot2)
library(ggstar)
p <- ggplot(data=mtcars,
mapping=aes(x=wt,
y=mpg,
fill=cyl)) +
geom_star()
p
```
<!-- ![](./inst/extdata/figure1.png) -->
```{r, eval=FALSE, echo=FALSE}
p2 <- ggplot(data=iris,
mapping=aes(x=Sepal.Length,
y=Sepal.Width,
fill=Species)) +
geom_star()
p2
```
<!-- ![](./inst/extdata/figure2.png) -->
```{r, eval=FALSE, echo=FALSE}
p3 <- ggplot(data=iris,
mapping=aes(x=Sepal.Length,
y=Sepal.Width,
fill=Species,
starshape=Species)) +
geom_star() + scale_starshape_manual(values=c(1, 2, 9))
p3
```
<!-- ![](./inst/extdata/figure3.png) -->
# :book: Vignette
For more details, please refer to the [online vignette](https://cran.r-project.org/web/packages/ggstar/vignettes/ggstar.html)
If you have installed it, you can also view the vignette on local.
```r
browseVignettes("ggstar")
```
# :sparkling_heart: Contributing
We welcome any contributions! By participating in this project you agree to abide
by the terms outlined in the [Contributor Code of Conduct](CONDUCT.md).