<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/create-powerpoint-presentations-from-r-with-the-officer-package/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2017/10/officer-powerpoint.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>For <a rel="nofollow" href="https://davidgohel.github.io/officer/" target="_blank"><img border="0" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c9268ae4970b-800wi" alt="Officer" title="Officer"></a> many of us data scientists, whatever the tools we use to conduct research or perform an analysis, our superiors are going to want the results as a Microsoft Office document. Most likely it's a Word document or a PowerPoint presentation, it probably has to follow the corporate branding guidelines to boot. The <a rel="nofollow" href="https://davidgohel.github.io/officer/" target="_blank">OfficeR package</a>, by David Gohel, addresses this problem by allowing you to take a Word or PowerPoint template and programatically insert text, tables and charts generated by R into the template to create a complete document. (The OfficeR package also represents a leap forward from the similar <a rel="nofollow" href="http://blog.revolutionanalytics.com/2016/10/reporters.html" target="_blank">ReporteRs package</a>: it's faster, and no longer has a dependency on a Java installation.)</p>
<p>At his blog, Len Kiefer takes the OfficeR package through its paces, demonstrating <a rel="nofollow" href="http://lenkiefer.com/2017/09/23/crafting-a-powerpoint-presentation-with-r/" target="_blank">how to create a PowerPoint deck using R</a>. The process is pretty simple:</p>
<ul>
<li>Create a template PowerPoint presentation to host the slides. You can use the <a rel="nofollow" href="https://support.office.com/en-us/article/What-is-a-slide-master-b9abb2a0-7aef-4257-a14e-4329c904da54" target="_blank">Slide Master mode</a> in PowerPoint to customize the style of the slides you will create using R, and you can use all of PowerPoint's features to control layout, select fonts and colors, and include images like logos. </li>
<li>For each slide you wish to create, you can either reference a template slide included in your base presentation, or add a new slide based on one of your custom layouts.</li>
<li>For each slide, you will reference on or or more placeholders (regions where content goes) in the layout using their unique names. You can then use R functions to fill them with text, hyperlinks, tables or images. The formatting of each will be controlled by the formatting you specified within Powerpoint.</li>
</ul>
<p>Len used this process to convert the content of a <a rel="nofollow" href="http://lenkiefer.com/2017/09/17/housing-vacancy-trends/" target="_blank">blog post on housing inventory</a> into the PowerPoint deck you see embedded below.</p>
<p><iframe allowfullscreen="" src="http://www.slideshare.net/slideshow/embed_code/key/3fwcZGkDMPx5Jn" width="450" height="420"> </iframe></p>
<p>You can find details of how to create Microsoft Office documents in the <a rel="nofollow" href="https://cran.r-project.org/web/packages/officer/vignettes/powerpoint.html" target="_blank">OfficeR vignette on PowerPoint documents</a>, and a there's a similar <a rel="nofollow" href="https://cran.r-project.org/web/packages/officer/vignettes/word.html" target="_blank">guide for Word documents</a>, too. Or just take a look at the blog post linked before for a worked example.</p>
<p>Len Kiefer: <a rel="nofollow" href="http://lenkiefer.com/2017/09/23/crafting-a-powerpoint-presentation-with-r/" target="_blank">Crafting a PowerPoint Presentation with R</a></p>
</div>
	<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.revolutionanalytics.com/2017/10/officer-powerpoint.html"> Revolutions</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 rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/EhUcLR0PbBM" height="1"></a></div>