Introducing Badgecreatr, a package that places badges in your readme

Introducing Badgecreatr, a package to create and place badges in your readme.Rmd file on Github.

Badgecreatr will create the following badges (aka shields):

Project Status: Active ? The project has reached a stable, usable state and is being actively developed. Licence Build Status codecov minimal R version CRAN\_Status\_Badge packageversion Last-changedate

Installation

Install the package with install.packages("badgecreatr")

How do you use badgecreatr?

Badgecreatr has one main function: badgeplacer().

The most simple command is:

badgecreatr::badgeplacer( githubaccount = "yourgithubname",githubrepo = "yourpackagename", branch = "master")

If your project is in its infancy and you don’t want people to use it yet:

badgecreatr::badgeplacer(status = "wip" , githubaccount = "yourgithubname",githubrepo = "yourpackagename") which will give it the status ‘Work in Progress’.

Repostatus gives you seven project statuses; Concept, WIP, Suspended, Abandoned, Active, Inactive, and Unsupported.

Why would you use this package?

When you have started yet another Github based r-package, copied the travis file and created a readme.Rmd file and you want to add these badges. Frankly I was a bit annoyed to copy almost identical markdown to new projects, it seemed right for automation.

Why would I not use this package?

  • you don’t create a r-package
  • you don’t want to create badges
  • you don’t use Github

What does badgecreatr do?

Badgecreatr reads your readme.Rmd file, reads your DESCRIPTION file and searches for a .travis.yml file.

Within the DESCRIPTION file badgecreatr will find: - package name - the version number of your package - the license : GPL-3, GPL-2, MIT, or CC0 - Minimal R version

Badgecreatr will create

  • repostatus badge (by default it will give you an active status)
  • a licence badge
  • If it finds a .travis.yml file:a Travis-CI Build-Status Badge
  • If it finds a codecov reference in the .travis.yml file, a Codecov Coverage Status Badge
  • a badge to indicate the version of R you are using
  • a CRAN status badge (will say ‘not published’ if your package is not on CRAN)
  • a package version badge
  • a last change badge

If you created badges in your readme before, badgecreatr will skip that badge.

Enjoy. - Roel

Notes:

  • The badges for R version, package version and last change are my invention.
  • The last change badge will update every time you re-knit your readme.md file
  • If you have suggestions or improvement open an issue or submit a pull request.

Further reading