Learn R Programming

Status Master branch:

Status Develop branch:

Introduction

This package was inspired by the badgerbadger package that checks for badges of travis, code coverage open issues, dependencies and licenses. It would be nice to have a simple function that adds these things to a readme.rmd file in R. It will save you typing and searching for the exact markdown on the websites of travis, codecov, repostatus.org etc.

This package does now place the following badges /shields:

  • [x] repo status according to https://www.repostatus.org/
  • [x] licence (recognize from DESCRIPTION file)
  • [x] travis shield
  • [x] code coverage
  • [x] minimal R version (recognize from DESCRIPTION file)
  • [x] cran badge
  • [x] packageversion (recognize from DESCRIPTION file)
  • [x] last change (this will automagically update everytime you knit your readme.rmd)
  • [x] finds github account and reponame automatically
  • [x] finds local repo
  • [x] nr of open issues
  • [x] number of pull requests
  • [x] rdocumentation badge

Possible future badges

  • [x] number of downloads CRAN
  • [ ] number of dependencies and:
  • [ ] a way to visualize their version
  • [ ] project lifecycle badge as used by tidyverse

Other changes initiatilzation on readme.md only (without active components)

Workflow

I like to use the following workflow:

  • start a new project in rstudio
  • after some functions are made start a package
  • start a github repo
  • create a readme.rmd
  • ( this is where badgecreatr comes in) create badges
  • continue with the project
  • submit to cran, bioconductor, ropensci etc

You will probably call badgecreatr only once, somewhere during your work.

If you call badgecreatr again when you already have badges, they will be recognized. [(see NEWS)]](NEWS.md)

Installation

badgecreatr is on CRAN, install using install.packages("badgecreatr"). But is has a flaw that I have fixed in the dev version.

The newest 'developmental' version is installed with devtools::install_github("rmhogervorst/badgecreatr")

Use

You can use this package in multiple ways: add a bunch of badges at once with badgecreatr::badgeplacer(), or you can add the badges with seperate commands, I have named them all badge_* so that autocomplete will make it much easier for you to find the correct one. See the vignette about scenarios of use for more info.

Contact

Want to help or have questions? Contact me directly, use an issue, fork me or submit a pull request.

Inspiration

I found the projectstatus https://www.repostatus.org/ and the wonderful shields.io projects and wanted to implement that for all my packages. But that took a lot of work. Repetitive work, and I don't like that.

The badgerbadgerbadger project in ruby did all these things automatically. I wanted to do the same thing for R projects. And I did.

Copy Link

Version

Install

install.packages('badgecreatr')

Monthly Downloads

29

Version

0.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Last Published

January 7th, 2019

Functions in badgecreatr (0.2.0)

badge_packageversion

Place a badge with the version of your package.
badge_codecov

CodeCoverage ' ' Adds a code cov badge
badge_cran_downloads

Add a badge for downloads from CRAN
badge_cran_version_ago

CRAN version and release in time
badge_cran_ago

CRAN time ago released
badge_github_star

Add a Github star badge
badge_cran

Add a badge for CRAN
badge_projectstatus

Add project status badge
badgeplacer

Place badges inside a readme.Rmd file
search_git

Return a list of remotes associated with this repo
badge_rank

RPackages.io ranking
badge_last_change

Creates last-change badge
badge_cran_date

CRAN release date of current version.
badge_rdocumentation

R documentation badge
badge_lifecycle

Add a lifecycle badge
badge_thanks_md

Add thanks badge
badgecreatr

badgecreatr
badge_travis

Travisbadge creates travis badge.
badgepaste

return markdown with image and link.
badge_last_change_static

Creates last-change badge static
badge_minimal_r_version

Display the minimal R version
badge_license

Create a licensebadge
findbadges

What badges are already found in the README.Rmd document
licbadgebuilder

Add license badge
github_credentials_helper

Returns github accountname, repo name and current branch.
dynamic_badges_minimal

Add dynamic content to readme
minimal_badges

Add a minimum of badges to your project
badge_cran_version_release

CRAN version and date of release
badge_github_fork

Add a Github fork badge