<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/a-basic-reproducible-data-analysis-workflow-principles/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.jom.link/reproducible_analysis_my_principles.html"> Joris Muller's blog - Posts about R</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>The goal of <strong>reproducible data analysis</strong> is, <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/views/ReproducibleResearch.html">according to the CRAN task view</a>, <em>to tie specific instructions to data analysis and experimental data so that scholarship can be recreated, better understood and verified</em>.</p>
<p>In order to prepare a small talk on this subject for <a target="_blank" rel="nofollow" href="https://www.meetup.com/fr-FR/StatsRbourg/events/236895990/">the next Strasbourg’s R user group meeting</a>, I’m starting a series of blog post. Today I will focus on the goals and constraints of my personal workflow.</p>
<h1>Goal of my workflow</h1>
<p>Beside some side projects, I use mainly R in an academic context. For this, I must be able to:</p>
<ul>
<li>Check my analysis and track logical errors.</li>
<li>Share them to be enhanced or curated by colleagues.</li>
<li>Send my code with papers. In order to struggle with the non-reproducible results crisis, this practice <a target="_blank" rel="nofollow" href="http://dx.doi.org/10.1136/bmj.i2770">tends to become a standard</a>.</li>
<li>As an epidemiologist, my raw data may change (<em>e.g.</em>: due to some quality data check or because a new year of data is available). Then I need to regenerate my reports with the new data.</li>
</ul>
<h1>Constraints</h1>
<p>Furthermore I have some constraints.</p>
<ul>
<li>My workflow has to be <strong>platform agnostic</strong>. For academic works, I use various Linux distributions on my workstation and some remote machines. My hospital’s computer with non-anonymous data run exclusively on Windows and I don’t have root access (then limited choice of my software tools). My personal setting is a mix between <a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/MacOS">macOS</a> and Linux boxes.</li>
<li>For the same reason, it must be <strong>easy to deploy</strong>. I don’t want to spend hours setting up a virtual or remote machine. Furthermore, peoples who wants to reproduce my analysis don’t have either the time or the ressources to install some complicated software suite.</li>
<li><strong>Free open source software</strong> (<a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/Free_and_open-source_software">FOSS</a>) is mandatory. Peoples who needs to run my analysis don’t want to pay for software, academics are not rich. Furthermore, open-source software is the only way to control really what the software does. The reproducibility is unattainable with close-source software black boxes.</li>
<li>Input must be the real <strong>raw data</strong>, whatever the format is (including <em>csv</em>, Microsoft Excel and Access files, SAS data or direct connection to <a target="_blank" rel="nofollow" href="https://en.wikipedia.org/wiki/Relational_database_management_system">RDBMS</a>).</li>
<li>Output could be html files (intermediate reports), PDF (for printing) or web app (Shiny).</li>
<li>It must be <strong>IDE agnostic</strong>. I love Rstudio but I have to work on headless remote machines and I don’t want to set up an Rstudio server each time. Script should be launch simply by a <code>R CMD</code> and edited in vim (or <a target="_blank" rel="nofollow" href="http://blog.jom.link/2016-08-22-why%20neovim">nvim</a>).</li>
</ul>
<h1>Summary of the implementation</h1>
<p>With these goals and constraints, R is a natural choice:</p>
<ul>
<li>R is light (± 70 Mo) and easy to install compared to Python with data science modules or SAS with its awkward licence checking system.</li>
<li>R’s package system give me all the tools needed, on every OS.</li>
<li>R is FOSS.</li>
<li>R tends to become the <em>lingua franca</em> in data science and statistics.</li>
<li><a target="_blank" rel="nofollow" href="https://www.rstudio.com/products/rstudio/">Rstudio</a> is a tremendous IDE, also easy to deploy</li>
</ul>
<p>After several years of R practice, I developed a simple workflow based on</p>
<ul>
<li>R with several packages: rmarkdown, knitr</li>
<li>Pandoc</li>
<li>Git</li>
<li>Coding style</li>
</ul>
<p>This is basic, doesn’t cover all reproductibility problems (<em>e.g.</em> no software archive) but is for me a good balance.</p>
<p>I will <a target="_blank" rel="nofollow" href="http://blog.jom.link/implementation_basic_reproductible_workflow.html">describe this workflow in a later post</a>.</p>
<p>If you have your own reproducible data analysis workflow, please feel free to describe it in the commentaries or send me a link!</p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.jom.link/reproducible_analysis_my_principles.html"> Joris Muller's blog - Posts about R</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/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/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/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/3LWMzPabn6k"></a></div>