<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/introducing-badgecreatr-a-package-that-places-badges-in-your-readme/"></div></div><div><a data-url="http://www.r-bloggers.com/introducing-badgecreatr-a-package-that-places-badges-in-your-readme/" data-counturl="http://www.r-bloggers.com/introducing-badgecreatr-a-package-that-places-badges-in-your-readme/" data-count="horizontal" data-text="Introducing Badgecreatr, a package that places badges in your readme" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://rmhogervorst.github.io/cleancode/blog/2016/07/08/introducing-badgecreatr-create-and-place-badges-in-readme-rmd.html"> Clean Code</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Introducing <strong>Badgecreatr</strong>, a package to create and place badges in your readme.Rmd file on Github.</p>
<p>Badgecreatr will create the following badges (aka shields):</p>
<p><a target="_blank" href="http://www.repostatus.org/#active"><img alt="Project Status: Active ? The project has reached a stable, usable state and is being actively developed." src="http://www.repostatus.org/badges/latest/active.svg"></a> <a target="_blank" href="https://www.gnu.org/licenses/gpl-3.0.en.html"><img alt="Licence" src="https://img.shields.io/badge/licence-GPL--3-blue.svg"></a> <a target="_blank" href="https://travis-ci.org/RMHogervorst/badgecreatr"><img alt="Build Status" src="https://travis-ci.org/RMHogervorst/badgecreatr.svg?branch=master"></a> <a target="_blank" href="https://codecov.io/gh/RMHogervorst/badgecreatr"><img alt="codecov" src="https://codecov.io/gh/RMHogervorst/badgecreatr/branch/master/graph/badge.svg"></a><br>
<a target="_blank" href="https://cran.r-project.org/"><img alt="minimal R version" src="https://img.shields.io/badge/R%3E%3D-3.2.4-6666ff.svg"></a> <a target="_blank" href="https://cran.r-project.org/package=badgecreatr"><img alt="CRAN_Status_Badge" src="http://www.r-pkg.org/badges/version/badgecreatr"></a> <a target="_blank" href="https://rmhogervorst.github.io/cleancode/blog/2016/07/08/commits/master"><img alt="packageversion" src="https://img.shields.io/badge/Package%20version-0.1.0-orange.svg?style=flat-square"></a><br>
<a target="_blank" href="https://rmhogervorst.github.io/commits/master"><img alt="Last-changedate" src="https://img.shields.io/badge/last%20change-2016--07--08-yellowgreen.svg"></a></p>
<h3>Installation</h3>
<p>Install the package with <code>install.packages(&quot;badgecreatr&quot;)</code></p>
<h3>How do you use badgecreatr?</h3>
<p>Badgecreatr has one main function: <code>badgeplacer()</code>.</p>
<p>The most simple command is:</p>
<div>
<pre><code><span>badgecreatr</span><span>::</span><span>badgeplacer</span><span>(</span><span> </span><span>githubaccount</span><span> </span><span>=</span><span> </span><span>&quot;yourgithubname&quot;</span><span>,</span><span>githubrepo</span><span> </span><span>=</span><span> </span><span>&quot;yourpackagename&quot;</span><span>,</span><span> </span><span>branch</span><span> </span><span>=</span><span> </span><span>&quot;master&quot;</span><span>)</span><span>
</span></code></pre>
</div>
<p>If your project is in its infancy and you don’t want people to use it yet:</p>
<p><code>badgecreatr::badgeplacer(status = &quot;wip&quot; , githubaccount = &quot;yourgithubname&quot;,githubrepo = &quot;yourpackagename&quot;)</code> which will give it the status ‘Work in Progress’.</p>
<p>Repostatus gives you seven <a target="_blank" href="https://rmhogervorst.github.io/cleancode/blog/2016/07/08/www.repostatus.org">project statuses</a>; Concept, WIP, Suspended, Abandoned, Active, Inactive, and Unsupported.</p>
<h3>Why would you use this package?</h3>
<p>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.<br>
Frankly I was a bit annoyed to copy almost identical markdown to new projects, it seemed right for automation.</p>
<p><strong>Why would I not use this package?</strong></p>
<ul>
<li>you don’t create a r-package</li>
<li>you don’t want to create badges</li>
<li>you don’t use Github</li>
</ul>
<h2>What does badgecreatr do?</h2>
<p>Badgecreatr reads your <code>readme.Rmd</code> file, reads your <code>DESCRIPTION</code> file and searches for a <code>.travis.yml</code> file.</p>
<p>Within the <code>DESCRIPTION</code> file badgecreatr will find:<br>
– package name<br>
– the version number of your package<br>
– the license : GPL-3, GPL-2, MIT, or CC0<br>
– Minimal R version</p>
<p><strong>Badgecreatr will create</strong></p>
<ul>
<li><a target="_blank" href="https://rmhogervorst.github.io/cleancode/blog/2016/07/08/www.repostatus.org">repostatus</a> badge (by default it will give you an active status)</li>
<li>a licence badge</li>
<li><em>If it finds a .travis.yml file</em>:a Travis-CI Build-Status Badge</li>
<li><em>If it finds a codecov reference in the .travis.yml file,</em> a Codecov Coverage Status Badge</li>
<li>a badge to indicate the version of R you are using</li>
<li>a CRAN status badge (will say ‘not published’ if your package is not on CRAN)</li>
<li>a package version badge</li>
<li>a last change badge</li>
</ul>
<p>If you created badges in your readme before, badgecreatr will skip that badge.</p>
<p>Enjoy. – Roel</p>
<h3>Notes:</h3>
<ul>
<li>The badges for R version, package version and last change are my invention.</li>
<li>The last change badge will update every time you re-knit your readme.md file</li>
<li>If you have suggestions or improvement open an <a target="_blank" href="https://github.com/RMHogervorst/badgecreatr/issues">issue</a> or submit a <a target="_blank" href="https://github.com/RMHogervorst/badgecreatr/compare">pull request</a>.</li>
</ul>
<h2>Further reading</h2>
<ul>
<li>The package on CRAN: <a target="_blank" href="https://cran.r-project.org/web/packages/badgecreatr/index.html">https://cran.r-project.org/web/packages/badgecreatr/index.html</a></li>
<li>The package on Github : https://github.com/RMHogervorst/badgecreatr</li>
<li>My inspiration: <a target="_blank" href="https://github.com/badges/badgerbadgerbadger">https://github.com/badges/badgerbadgerbadger</a> &amp; <a target="_blank" href="http://shields.io/">http://shields.io/</a></li>
</ul>
<p><a target="_blank" href="https://rmhogervorst.github.io/cleancode/blog/2016/07/08/introducing-badgecreatr-create-and-place-badges-in-readme-rmd.html">Introducing Badgecreatr, a package that places badges in your readme</a> was originally published by at <a target="_blank" href="https://rmhogervorst.github.io/cleancode">Clean Code</a> on July 08, 2016.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/introducing-badgecreatr-a-package-that-places-badges-in-your-readme/"></div></div><div><a data-url="http://www.r-bloggers.com/introducing-badgecreatr-a-package-that-places-badges-in-your-readme/" data-counturl="http://www.r-bloggers.com/introducing-badgecreatr-a-package-that-places-badges-in-your-readme/" data-count="vertical" data-text="Introducing Badgecreatr, a package that places badges in your readme" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://rmhogervorst.github.io/cleancode/blog/2016/07/08/introducing-badgecreatr-create-and-place-badges-in-readme-rmd.html"> Clean Code</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/L_GJZhoI8Cg"></a></div>