<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/what-every-r-package-must-really-contain-an-example-on-the-erum2016-package/"></div></div><div><a data-url="https://www.r-bloggers.com/what-every-r-package-must-really-contain-an-example-on-the-erum2016-package/" data-counturl="https://www.r-bloggers.com/what-every-r-package-must-really-contain-an-example-on-the-erum2016-package/" data-count="horizontal" data-text="What Every R Package Must (REALLY) Contain? An Example on the eRum2016 Package" 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="http://r-addict.com/2016/09/08/Package-Must-Have.html"> http://r-addict.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><img src="https://i2.wp.com/r-addict.com/images/fulls/what.jpg?w=456" data-recalc-dims="1"> The R package development is a complex process of creating (mostly) a useful software, that will (probably) be used by other users. This means the provided tool should be resistant, immune, well tested and properly documented. Developers from many different languages have invented various approaches to improve software development, creating documentation or package testing. R users have adapted few of them and mostly we use <a target="_blank" href="https://travis-ci.org/">travis</a> for continuous integration, <a target="_blank" href="https://cran.r-project.org/web/packages/roxygen2/index.html">roxygen2</a> for documentation, <a target="_blank" href="https://github.com/hadley/devtools">devtools</a> for testing and <a target="_blank" href="http://yihui.name/knitr/">knitr</a> / <a target="_blank" href="http://rmarkdown.rstudio.com/">rmarkdown</a> for writing manuals, tutorials, vignettes and package websites. This software development kit causes that the R package structure is rather broad, especially since many of us (R developers) puts source code from different languages into the package root to speed up the performance of created tools. Moreover we built our software libraries that are based on other packages, which complicates the NAMESPACE of the prepared package and forces the understanding of difference between dependent, imported and suggested packages. In this whole ecosystem of development equipment and requirements for proper package structure I’ve been asked <strong>What Every R Package Must Contain?</strong> You wouldn’t guess how easy was the answer.</p>
<h1>DESCRIPTION file with 7 filled fields</h1>
<p>On my last job interview on the R developer position the recruiting manager asked me <strong>What every R package must contain?</strong> Probably it was a trigger to conversation about the best practices in the R package development process, including roxygen2 or devtools. Because I was tired of elementary questions I have responded nonstandardly – <strong>A DESCRIPTION file, and that’s it</strong>.</p>
<blockquote>
<p>In fact you only need a DESCRIPTION file with 7 filled fields to have a package that passes CRAN CHECK!</p>
</blockquote>
<p>I was amazed how we have developed and complicated the process of extending base R from this simple statement.</p>
<p>Below you can see the <code>eRum2016</code> package that only have a DESCRIPTION file with such fields (URL is the extra, unneded field) <a target="_blank" href="https://travis-ci.org/eRum2016/eRum2016">passes checks on Travis platform</a>.</p>
<p>By default, on Travis the <code>R CMD check --as-cran</code> is perfomed.</p>
<figure>
<pre><code data-lang="r"><span>cat</span><span>(</span><span>readLines</span><span>(</span><span>'https://raw.githubusercontent.com/eRum2016/eRum2016/master/DESCRIPTION'</span><span>),</span><span>
</span><span>sep</span><span> </span><span>=</span><span> </span><span>'\n'</span><span>)</span></code></pre>
</figure>
<figure>
<pre><code data-lang="text">Package: eRum2016
Title: European R Users Meeting
Version: 0.0.2016
Author: European R Community
Maintainer: European R Community &lt;erum@konf.ue.poznan.pl>
Description: European R users meeting (eRum) is an international conference that aims at integrating users of the R language.
    eRum 2016 will be a good chance to exchange experiences, broaden knowledge on R and collaborate.
License: GPL-2
URL: http://erum.ue.poznan.pl/</code></pre>
</figure>
<p>This package can be even installed from GitHub and the index of this package can be opened to present the information included in the DESCRIPTION file</p>
<figure>
<pre><code data-lang="r"><span>devtools</span><span>::</span><span>install_github</span><span>(</span><span>'eRum2016/eRum2016'</span><span>)</span><span>
</span><span>library</span><span>(</span><span>eRum2016</span><span>)</span><span>
</span><span>help</span><span>(</span><span>package</span><span> </span><span>=</span><span> </span><span>&quot;eRum2016&quot;</span><span>)</span></code></pre>
</figure>
<p>This package present the key information for European R Users Meeting that will be held September in Poznań, Poland. More information about this converence can be checked on the conference website <a target="_blank" href="http://erum.ue.poznan.pl/">http://erum.ue.poznan.pl/</a>.</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="https://www.r-bloggers.com/what-every-r-package-must-really-contain-an-example-on-the-erum2016-package/"></div></div><div><a data-url="https://www.r-bloggers.com/what-every-r-package-must-really-contain-an-example-on-the-erum2016-package/" data-counturl="https://www.r-bloggers.com/what-every-r-package-must-really-contain-an-example-on-the-erum2016-package/" data-count="vertical" data-text="What Every R Package Must (REALLY) Contain? An Example on the eRum2016 Package" 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="http://r-addict.com/2016/09/08/Package-Must-Have.html"> http://r-addict.com</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://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="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/nefQBEeD2HI"></a></div>