Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/GuangchuangYu/badger

Badge for R Package
https://github.com/GuangchuangYu/badger

badge r

Last synced: about 2 months ago
JSON representation

Badge for R Package

Awesome Lists containing this project

README

        

---
output:
md_document:
variant: gfm
html_preview: false
---

```{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"),
badge_github_actions()
)
```

Query information and generate badge for using in README and GitHub Pages.

## :writing_hand: Author

Guangchuang YU

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", "WeChat", "green", "https://guangchuangyu.github.io/blog_images/biobabble.jpg")`

## :arrow_double_down: 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")
```

----

## :book: 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_release("badger", "orange")` ``
- badge: `r badge_cran_release("badger", "orange")`
+ r-universe version
- syntax: `` ``r ''`r badge_runiverse("and", "rossellhayes")` ``
- badge: `r badge_runiverse("and", "rossellhayes")`
+ 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("stable")` ``
- badge: `r badge_lifecycle("stable")`
+ Project status
- syntax: `` ``r ''`r badge_repostatus("Active")` ``
- badge: `r badge_repostatus("Active")`
+ License
- syntax: `` ``r ''`r badge_license("Artistic-2.0")` ``
- badge: `r badge_license("Artistic-2.0")`
+ 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")`
+ codecov code coverage
- syntax: `` ``r ''`r badge_codecov("rcannood/princurve")` ``
- badge: `r badge_codecov("rcannood/princurve")`
+ 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")`
+ CRAN checks results
- syntax: `` ``r ''`r badge_cran_checks("badger")` ``
- badge: `r badge_cran_checks("badger")`
+ GitHub actions
- syntax: `` ``r ''`r badge_github_actions("rossellhayes/ipa")` ``
- badge: `r badge_github_actions("rossellhayes/ipa")`
+ CodeFactor code quality
- syntax: `` ``r ''`r badge_codefactor("rossellhayes/ipa")` ``
- badge: `r badge_codefactor("rossellhayes/ipa")`

## :hammer: Related Tools

+ [hexSticker](https://github.com/GuangchuangYu/hexSticker): create hexagon sticker in R