Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
141 lines (104 sloc) 4.37 KB
---
output:
md_document:
variant: gfm
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r echo=FALSE, results="hide", message=FALSE}
library("badger")
```
# badger: Badge for R Package
```{r, echo = FALSE, results='asis'}
cat(
badge_cran_release("badger", "green"),
badge_cran_download("badger", "grand-total", "green"),
badge_cran_download("badger", "last-month", "green"),
badge_cran_download("badger", "last-week", "green")
)
```
Query information and generate badge for using in README and GitHub Pages.
## Author
Guangchuang YU <https://guangchuangyu.github.io>
School of Basic Medical Sciences, Southern Medical University
[![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/GuangchuangYu)
`r badger::badge_custom("follow me on", "微信", "green", "https://guangchuangyu.github.io/blog_images/biobabble.jpg")`
`r badger::badge_custom("打赏", "支付宝/微信", "green", "https://guangchuangyu.github.io/blog_images/pay_qrcode.png")`
## Installation
Get the released version from CRAN:
```r
install.packages("badger")
```
Or the development version from github:
```r
## install.packages("devtools")
devtools::install_github("GuangchuangYu/badger")
```
----
## Examples
### Package Version
+ release version (bioconductor)
- syntax: `` ``r ''`r badge_bioc_release("ggtree", "green")` ``
- badge: `r badge_bioc_release("ggtree", "green")`
+ release version (CRAN)
- syntax: `` ``r ''`r badge_cran("badger", "orange")` ``
- badge: `r badge_cran_release("badger", "orange")`
+ devel version
- syntax: `` ``r ''`r badge_devel("guangchuangyu/ggtree", "blue")` ``
- badge: `r badge_devel("guangchuangyu/ggtree", "blue")`
### Download stats for bioconductor
+ Total of total :)
- syntax: `` ``r ''`r badge_bioc_download("clusterProfiler", "total", "blue",
"total")` ``
- badge: `r badge_bioc_download("clusterProfiler", "total", "blue",
"total")`
+ Total of distinct IPs
- syntax: `` ``r ''`r badge_bioc_download("clusterProfiler", "total", "yellow")` ``
- badge: `r badge_bioc_download("clusterProfiler", "total", "yellow")`
+ Monthly download of distinct IPs
- syntax: `` ``r ''`r badge_bioc_download("clusterProfiler", "month", "green")` ``
- badge: `r badge_bioc_download("clusterProfiler", "month", "green")`
### Download stats for CRAN
+ Total downloads
- syntax: `` ``r ''`r badge_cran_download("badger", "grand-total", "blue")` ``
- badge: `r badge_cran_download("badger", "grand-total", "blue")`
+ Monthly Downloads
- syntax: `` ``r ''`r badge_cran_download("badger", "last-month", "green")` ``
- badge: `r badge_cran_download("badger", "last-month", "green")`
+ Weekly Downloads
- syntax: `` ``r ''`r badge_cran_download("badger", "last-week", "yellow")` ``
- badge: `r badge_cran_download("badger", "last-week", "yellow")`
### Impact
+ Altmetric score
- syntax: `` ``r ''`r badge_altmetric("10533079", "green")` ``
- badge: `r badge_altmetric("10533079", "green")`
### Academic
+ DOI
- syntax: `` ``r ''`r badge_doi("10.1111/2041-210X.12628", "yellow")` ``
- badge: `r badge_doi("10.1111/2041-210X.12628", "yellow")`
### Customize badge
+ syntax: `` ``r ''`r badge_custom("1st most cited paper", "in OMICS", "blue",
"http://online.liebertpub.com/action/showMostCitedArticles?journalCode=omi")` ``
+ badge: `r badge_custom("1st most cited paper", "in OMICS", "blue",
"http://online.liebertpub.com/action/showMostCitedArticles?journalCode=omi")`
### Development
+ Lifecycle
- syntax: `` ``r ''`r badge_lifecycle("maturing", "blue")` ``
- badge: `r badge_lifecycle("maturing", "blue")`
+ travis build-status
- syntax: `` ``r ''`r badge_travis("rstudio/rmarkdown")` ``
- badge: `r badge_travis("rstudio/rmarkdown")`
+ coveralls code coverage
- syntax: `` ``r ''`r badge_coveralls("google/benchmark")` ``
- badge: `r badge_coveralls("google/benchmark")`
+ code size
- syntax: `` ``r ''`r badge_code_size("GuangchuangYu/badger")` ``
- badge: `r badge_code_size("GuangchuangYu/badger")`
+ last commit date
- syntax: `` ``r ''`r badge_last_commit("GuangchuangYu/badger")` ``
- badge: `r badge_last_commit("GuangchuangYu/badger")`
+ direct and recursive dependencies (for CRAN pkgs)
- syntax: `` ``r ''`r badge_dependencies("badger")` ``
- badge: `r badge_dependencies("badger")`
## Related Tools
+ [hexSticker](https://github.com/GuangchuangYu/hexSticker): create hexagon sticker in R
You can’t perform that action at this time.