Introducing Badgecreatr, a package that places badges in your readme

July 7, 2016

(This article was first published on Clean Code, and kindly contributed to R-bloggers)

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


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


  • 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 file
  • If you have suggestions or improvement open an issue or submit a pull request.

Further reading

Introducing Badgecreatr, a package that places badges in your readme was originally published by at Clean Code on July 08, 2016.

To leave a comment for the author, please follow the link and comment on their blog: Clean Code. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)