<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>R Markdown on R Views</title>
    <link>https://rviews.rstudio.com/categories/r-markdown/</link>
    <description>Recent content in R Markdown on R Views</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 18 Nov 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://rviews.rstudio.com/categories/r-markdown/" rel="self" type="application/rss+xml" />
    
    
    
    
    <item>
      <title>Deploying xaringan Slides with GitHub Pages</title>
      <link>https://rviews.rstudio.com/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/</link>
      <pubDate>Thu, 18 Nov 2021 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/</guid>
      <description>
        
&lt;script src=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/header-attrs/header-attrs.js&#34;&gt;&lt;/script&gt;
&lt;script src=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/clipboard/clipboard.min.js&#34;&gt;&lt;/script&gt;
&lt;link href=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/xaringanExtra-clipboard/xaringanExtra-clipboard.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/xaringanExtra-clipboard/xaringanExtra-clipboard.js&#34;&gt;&lt;/script&gt;
&lt;script&gt;window.xaringanExtraClipboard(null, {&#34;button&#34;:&#34;&lt;i class=\&#34;fa fa-clipboard\&#34;&gt;&lt;\/i&gt; Copy Code&#34;,&#34;success&#34;:&#34;&lt;i class=\&#34;fa fa-check\&#34; style=\&#34;color: #90BE6D\&#34;&gt;&lt;\/i&gt; Copied!&#34;,&#34;error&#34;:&#34;Press Ctrl+C to Copy&#34;})&lt;/script&gt;
&lt;link href=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/font-awesome/css/all.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;link href=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/font-awesome/css/v4-shims.css&#34; rel=&#34;stylesheet&#34; /&gt;
&lt;script src=&#34;/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/index_files/fitvids/fitvids.min.js&#34;&gt;&lt;/script&gt;


&lt;p&gt;&lt;em&gt;Silvia Canelón is a researcher, community organizer, and R educator. Her research leverages electronic health record data to study pregnancy-related outcomes, and her organizing values data literacy and communication as ways to build power and effect change.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This post will guide you step-by-step through the process of creating an HTML xaringan slide deck and deploying it to the web for easy sharing with others. We will be using the &lt;code&gt;xaringan&lt;/code&gt; package to build the slide deck, GitHub to help us host our slides for free with GitHub Pages, and the &lt;code&gt;usethis&lt;/code&gt; package to help us out along the way. You will get the most out of this workflow if you are already familiar with R Markdown and GitHub, and if you have already connected RStudio (or your preferred IDE) to Git and GitHub.&lt;a href=&#34;#fn1&#34; class=&#34;footnote-ref&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; The post will not cover the nuts and bolts of xaringan or talk about slide design &amp;amp; customization, but you can find lots of &lt;a href=&#34;#learn-more&#34;&gt;learning resources&lt;/a&gt; listed at the end.&lt;/p&gt;
&lt;div id=&#34;choose-your-own-adventure&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Choose your own adventure&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Option 1:&lt;/strong&gt; Start at the &lt;a href=&#34;#the-ten-step-workflow&#34;&gt;beginning of the workflow&lt;/a&gt; to make a slide deck using the R Markdown template built into the &lt;code&gt;xaringan&lt;/code&gt; package. The built-in template doubles as documentation for the &lt;code&gt;xaringan&lt;/code&gt; package, so it is a great way to familiarize yourself with the package features, but it also includes a lot of content that will probably want to remove and modify when creating your presentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Option 2:&lt;/strong&gt; Start with an &lt;a href=&#34;https://spcanelon.github.io/RLadies-xaringan-template&#34;&gt;R-Ladies themed xaringan template&lt;/a&gt; (embedded below). This is an example slide deck originally created as a teaching tool to highlight some of the main features of the &lt;code&gt;xaringan&lt;/code&gt; package, and to demo some customization that incorporates the R-Ladies CSS theme built into xaringan. Please feel welcome to use/modify it to suit your needs! When you are ready, you can follow the steps immediately below 👇 to download the files to your machine, and then skip down to &lt;a href=&#34;#initialize-version-control-with-git&#34;&gt;Initialize version control with git&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;usethis::use_course(
  repo_spec = &amp;quot;spcanelon/RLadies-xaringan-template&amp;quot;,
  destdir = &amp;quot;filepath/for/your/presentation&amp;quot;
  )&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: After copying the files to your machine you’ll probably want to rename the file folder to whatever makes sense for your presentation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;div class=&#34;shareagain&#34; style=&#34;min-width:300px;margin:1em auto;&#34;&gt;
&lt;iframe src=&#34;https://spcanelon.github.io/RLadies-xaringan-template&#34; width=&#34;400&#34; height=&#34;300&#34; style=&#34;border:2px solid currentColor;&#34; loading=&#34;lazy&#34; allowfullscreen&gt;&lt;/iframe&gt;
&lt;script&gt;fitvids(&#39;.shareagain&#39;, {players: &#39;iframe&#39;});&lt;/script&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Try navigating through the slides ☝️ with your left/right arrow keys and press the letter “P” on your keyboard to see some notes in Presenter View.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div id=&#34;the-ten-step-workflow&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;The Ten-Step Workflow&lt;/h1&gt;
&lt;div id=&#34;packages&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Packages&lt;/h2&gt;
&lt;p&gt;This workflow was developed using:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr class=&#34;header&#34;&gt;
&lt;th&gt;Software / package&lt;/th&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;R&lt;/td&gt;
&lt;td&gt;4.0.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;RStudio&lt;/td&gt;
&lt;td&gt;1.4.1103&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td&gt;&lt;code&gt;xaringan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td&gt;&lt;code&gt;usethis&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2.0.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;install.packages(&amp;quot;xaringan&amp;quot;)
install.packages(&amp;quot;usethis&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;creating-your-xaringan-slide-deck&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Creating your xaringan slide deck&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1. Create a new RStudio project for your presentation:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;usethis::create_project(&amp;quot;filepath/for/your/presentation/repo-name&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;📍 If you’re not sure where you are on your computer, check your working directory with &lt;code&gt;getwd()&lt;/code&gt; and use it as a filepath reference point&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!--Output:    
    
    ```r
    New project &#39;rladies-xaringan-template&#39; is nested inside an existing project &#39;/filepath/for/the/presentation/&#39;, which is rarely a good idea.
    If this is unexpected, the here package has a function, `here::dr_here()` that reveals why &#39;/filepath/for/the/presentation/&#39; is regarded as a project.
    Do you want to create anyway?
    
    1: Absolutely not
    2: Yup
    3: No
    
    Selection: 2
    ```
--&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Create a xaringan deck using a xaringan template:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;File&lt;/em&gt; &amp;gt; &lt;em&gt;New File&lt;/em&gt; &amp;gt; &lt;em&gt;R Markdown&lt;/em&gt; &amp;gt; &lt;em&gt;From Template&lt;/em&gt; &amp;gt; &lt;em&gt;Ninja Presentation&lt;/em&gt; &amp;gt; &lt;em&gt;OK&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Delete what you don’t need and save your R Markdown file with whatever name you like.&lt;/strong&gt; If you pick &lt;code&gt;index.Rmd&lt;/code&gt; the live link you share at the end will be relatively short.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Render HTML slides from the open Rmd file using xaringan’s infinite moon reader:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;  xaringan::infinite_moon_reader()&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;initialize-version-control-with-git&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Initialize version control with git&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;5. Initialize version control of your slides with git:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;usethis::use_git()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;You’ll be asked if you want to commit the files in your project (with the message “Initial commit”) and then if you want to restart to activate the Git pane. Say yes to both ✅
&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: At the moment &lt;code&gt;usethis&lt;/code&gt; names the primary branch “master” by default. &lt;a href=&#34;https://github.com/r-lib/usethis/issues/1341&#34;&gt;Issue #1341&lt;/a&gt; suggests the option to instead name it “main” is in the works.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!--Output:
&gt; usethis::use_git()
✓ Setting active project to &#39;/filepath/for/the/presentation/rladies-xaringan-template&#39;
✓ Initialising Git repo
✓ Adding &#39;.Rhistory&#39;, &#39;.Rdata&#39;, &#39;.httr-oauth&#39;, &#39;.DS_Store&#39; to &#39;.gitignore&#39;
There are 6 uncommitted files:
* &#39;.gitignore&#39;
* &#39;index_files/&#39;
* &#39;index.html&#39;
* &#39;index.Rmd&#39;
* &#39;libs/&#39;
* &#39;rladies-xaringan-template.Rproj&#39;
Is it ok to commit them?

1: Yup
2: Negative
3: No way

Selection: 1


✓ Adding files
✓ Making a commit with message &#39;Initial commit&#39;
● A restart of RStudio is required to activate the Git pane
Restart now?

1: Yes
2: Nope
3: Not now

Selection: 

--&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Connect your local project with a GitHub repo:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;usethis::use_github()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You could use the function argument &lt;code&gt;private = TRUE&lt;/code&gt; to create a private GitHub repository. But you may have to remember to change the visibility before &lt;a href=&#34;#deploying-your-slides&#34;&gt;deploying to GitHub Pages&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!--Output:
&gt; usethis::use_github(private = TRUE)
ℹ Defaulting to https Git protocol
✓ Setting active project to &#39;/filepath/for/the/presentation/rladies-xaringan-template&#39;
✓ Checking that current branch is default branch (&#39;master&#39;)
✓ Creating private GitHub repository &#39;spcanelon/rladies-xaringan-template&#39;
✓ Setting remote &#39;origin&#39; to &#39;https://github.com/spcanelon/rladies-xaringan-template.git&#39;
✓ Pushing &#39;master&#39; branch to GitHub and setting &#39;origin/master&#39; as upstream branch
✓ Opening URL &#39;https://github.com/spcanelon/rladies-xaringan-template&#39;
--&gt;
&lt;p&gt;&lt;br&gt;&lt;br /&gt;
&lt;strong&gt;7. Your new GitHub repo with all of your xaringan project files will automatically open up in your browser&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Repo for the R-Ladies xaringan template:&lt;br&gt;
&lt;a href=&#34;https://github.com/spcanelon/RLadies-xaringan-template&#34; class=&#34;uri&#34;&gt;https://github.com/spcanelon/RLadies-xaringan-template&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div id=&#34;making-and-committing-changes-to-your-slides&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Making and committing changes to your slides&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;8. Edit your slides as you wish.&lt;/strong&gt; Commit often! And then push to GitHub. Use the tools provided by the Git pane in RStudio, or use the following commands in the Terminal:&lt;/p&gt;
&lt;pre class=&#34;bash&#34;&gt;&lt;code&gt;# Step 1: Stage all modified files
git add .&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;pre class=&#34;bash&#34;&gt;&lt;code&gt;# Step 2: Describe the changes you made to your files
git commit -m &amp;quot;&amp;lt;A brief but descriptive commit message&amp;gt;&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Consider writing a commit message that finishes the following sentence:&lt;a href=&#34;#fn2&#34; class=&#34;footnote-ref&#34; id=&#34;fnref2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt; “If applied, this commit will…” (e.g. “Change the slide theme”, “Add hello slide”)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;pre class=&#34;bash&#34;&gt;&lt;code&gt;# Step 3: Push the changes to your GitHub repository
git push&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;deploying-your-slides&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Deploying your slides&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;9. When you’re ready to deploy your slides, you can use the &lt;code&gt;usethis::use_github_pages()&lt;/code&gt; function&lt;/strong&gt; which makes the process of deploying via GitHub Pages super easy. I recommend pointing &lt;code&gt;branch&lt;/code&gt; to the name of your primary branch.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;usethis::use_github_pages(branch = &amp;quot;master&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: Your repository must be &lt;strong&gt;public&lt;/strong&gt; for your deployed slides to be available publicly, unless you have a paid GitHub account.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also, you only need to follow this step &lt;em&gt;once&lt;/em&gt; to deploy your slides to the web. As long as you remember to push to your repo any changes that you make to your slides (Rmd and HTML), GitHub Pages will know how to render them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!--Output:
&gt; usethis::use_github_pages(branch = &#34;master&#34;)
✓ Setting active project to &#39;/Users/scanelon/Box/2-Teaching/R-Projects/R-Ladies/RLadies-xaringan-template&#39;
✓ Activating GitHub Pages for &#39;spcanelon/rladies-xaringan-template&#39;
✓ GitHub Pages is publishing from:
● URL: &#39;https://spcanelon.github.io/RLadies-xaringan-template/&#39;
● Branch: &#39;master&#39;
● Path: &#39;/&#39;
--&gt;
&lt;p&gt;&lt;strong&gt;10. Visit the link provided to see your newly deployed slides!&lt;/strong&gt; 🚀&lt;br&gt;Don’t panic if you don’t see them right away, sometimes it takes a little time. This is the link you will share with the world when you present. Notice it looks &lt;em&gt;very&lt;/em&gt; similar to your GitHub repo link.
&lt;br&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Link to the R-Ladies xaringan template rendered slides:&lt;br&gt;
&lt;a href=&#34;https://spcanelon.github.io/RLadies-xaringan-template&#34; class=&#34;uri&#34;&gt;https://spcanelon.github.io/RLadies-xaringan-template&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;bonus-steps&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Bonus steps&lt;/h1&gt;
&lt;p&gt;11. Go to the &lt;a href=&#34;https://github.com/spcanelon/RLadies-xaringan-template&#34;&gt;repository home page&lt;/a&gt; and find the About section on the right hand side. Add a description of your presentation and the link to your slides, that way your presentation is easily available to anyone visiting your repo.&lt;/p&gt;
&lt;p&gt;12. Check out Garrick Aden-Buie’s blog post Sharing Your xaringan Slides to learn how to &lt;a href=&#34;https://www.garrickadenbuie.com/blog/sharing-xaringan-slides/#create-a-social-media-card&#34;&gt;create a social media card&lt;/a&gt; for your slides and use your new link to share your slides in more places (e.g. &lt;a href=&#34;https://www.garrickadenbuie.com/blog/sharing-xaringan-slides/#embed-your-slides&#34;&gt;embedded on a website&lt;/a&gt;, etc.)&lt;/p&gt;
&lt;p&gt;13. This GitHub Pages workflow is not exclusive to xaringan slides! Try it out with any other HTML file.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;learn-more&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Learn more&lt;/h1&gt;
&lt;div id=&#34;foundation&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Foundation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://spcanelon.github.io/xaringan-basics-and-beyond/index.html&#34;&gt;Sharing Your Work with xaringan • Silvia Canelón&lt;/a&gt; – workshop site&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://silvia.rbind.io/talk/2020-12-17-introduccion-xaringan/&#34;&gt;Introducción al Paquete xaringan • Silvia Canelón&lt;/a&gt; – R-Ladies Meetup&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://arm.rbind.io/slides/xaringan.html&#34;&gt;Making Slides with R Markdown • Alison Hill&lt;/a&gt; – workshop slides&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://slides.yihui.org/xaringan/&#34;&gt;Presentation Ninja • xaringan Official Document&lt;/a&gt; – package documentation&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://bookdown.org/yihui/rmarkdown/xaringan.html&#34;&gt;Chapter 7 xaringan Presentations • R Markdown: The Definitive Guide&lt;/a&gt; – book chapter&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&#34;sharing-your-slides&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Sharing your slides&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.garrickadenbuie.com/blog/sharing-xaringan-slides/&#34;&gt;Sharing Your xaringan Slides • Garrick Aden‑Buie&lt;/a&gt; – blog post&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://jhelvy.github.io/xaringanBuilder/&#34;&gt;Functions For Building Xaringan Slides To Different Outputs. • xaringanBuilder&lt;/a&gt; – package site&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://alison.rbind.io/talk/2020-sharing-short-notice/&#34;&gt;Sharing on Short Notice • Alison Hill &amp;amp; Desirée De Leon&lt;/a&gt; – video resource for deploying via Netlify&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&#34;making-your-slides-extra-special&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Making your slides extra special&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://presentable-user2021.netlify.app/&#34;&gt;Professional, Polished, Presentable • Garrick Aden‑Buie &amp;amp; Silvia Canelón • useR!2021&lt;/a&gt; – workshop site&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/yihui/xaringan/wiki&#34;&gt;Home · yihui/xaringan Wiki • GitHub&lt;/a&gt; – wiki of customizations for xaringan&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.garrickadenbuie.com/talk/extra-great-slides-nyhackr/&#34;&gt;Making Extra Great Slides • Garrick Aden‑Buie&lt;/a&gt; – talk &amp;amp; slides with xaringan overview and featuring CSS styling and xaringanthemer&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.katiejolly.io/blog/2021-03-16/designing-slides&#34;&gt;Applying design guidelines to slides with {xaringanthemer} • katie jolly&lt;/a&gt; – blog post&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.garrickadenbuie.com/xaringanExtra/#/?id=xaringanextra&#34;&gt;A playground of extensions for xaringan • xaringanExtra&lt;/a&gt; – package site&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.garrickadenbuie.com/xaringanthemer/&#34;&gt;Custom xaringan CSS Themes • xaringanthemer&lt;/a&gt; – package site&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Note from the Editor: Silvia’s post is a mini masterpiece of clear, concise writing that elucidates complex technology within the narrow context of explaining a single well-defined task. Silvia does not attempt to say everything she knows about the subject, and she resists digressions that might obscure the path she is laying out. It is an example of achieving clarity through saying less.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;&lt;a href=&#34;https://happygitwithr.com/rstudio-git-github.html&#34;&gt;Chapter 12 Connect RStudio to Git and GitHub | Happy Git and GitHub for the useR&lt;/a&gt;&lt;a href=&#34;#fnref1&#34; class=&#34;footnote-back&#34;&gt;↩︎&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li id=&#34;fn2&#34;&gt;&lt;p&gt;&lt;a href=&#34;https://chris.beams.io/posts/git-commit/#imperative&#34;&gt;How to Write a Git Commit Message | Chris Beams&lt;/a&gt;&lt;a href=&#34;#fnref2&#34; class=&#34;footnote-back&#34;&gt;↩︎&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2021/11/18/deploying-xaringan-slides-a-ten-step-github-pages-workflow/&#39;;&lt;/script&gt;
      </description>
    </item>
    
    <item>
      <title>How to share R visualizations in Microsoft PowerPoint</title>
      <link>https://rviews.rstudio.com/2019/04/04/sharing-r-visualizations-in-powerpoint/</link>
      <pubDate>Thu, 04 Apr 2019 00:00:00 +0000</pubDate>
      
      <guid>https://rviews.rstudio.com/2019/04/04/sharing-r-visualizations-in-powerpoint/</guid>
      <description>
        


&lt;p&gt;&lt;em&gt;Hadrien Dykiel is an RStudio Customer Success Engineer&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Microsoft PowerPoint is often the de facto choice for creating presentation slides, especially at larger companies. In many organizations, it comes pre-installed on workstations and pretty much everybody knows how to use it. This can make it an effective medium for sharing information, since most folks are comfortable with it. Unfortunately, valuable time is often lost manually creating slides. R developers often find themselves copying and pasting their results into presentation decks. Moreover, results may change or over time, requiring analysts and data scientists to manually update their slides with the latest results. So, in addition to being a time-consuming task, copying and pasting also introduces a big reproducibility problem. R can help solve these problems by programmatically exporting your results to PowerPoint for you.&lt;/p&gt;
&lt;p&gt;Let’s say you are collaborating on a project in which members of your team will use other tools like SAS and Excel to perform their analyses. At the end of the day, you plan to combine all of your work together into a single presentation deck that will be shared with various business stakeholders. You boot up RStudio and open an R Markdown file and produce a correlation plot for the presentation.&lt;/p&gt;
&lt;p&gt;Rather than manually copying and pasting your corrplot into the final PowerPoint deck, you can update the output document type in your document’s YAML header to &lt;code&gt;powerpoint_presentation&lt;/code&gt;. Optionally, you may also want to customize the appearance of your slides by passing a custom reference document via the &lt;code&gt;reference_doc&lt;/code&gt; option. This is a nice option to use if you want your slides to match your company’s color schemes, for example. The snippet below shows what the code for a typical &lt;code&gt;rmarkdown&lt;/code&gt; file with the output format set to PowerPoint might look like. Like all &lt;code&gt;.Rmd&lt;/code&gt; files, it contains three elements: a YAML header that contains the metadata for your RMD file, narrative in simple markdown syntax, and code.&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;/post/2019-03-05-sharing-r-visualizations-in-powerpoint_files/rmd_powerpoint_screenshot.png&#34; /&gt;

&lt;/div&gt;
&lt;p&gt;As soon as you hit the Knit button (or use the keyboard shortcut Cmd/Ctrl + Shift + K), RStudio initiates the knitting process. The &lt;code&gt;rmarkdown&lt;/code&gt; package transforms your R script into markdown, and the &lt;code&gt;pandoc&lt;/code&gt; package converts it to the PowerPoint output format, as specified in your YAML header. This process happens all underneath the hood, so as a user, the only thing you see is the final PowerPoint output file, which automatically opens as soon as your document finishes knitting. Because you created your PowerPoint slides programmatically, you can easily update them in the future, such as if new data becomes available and you wish to refresh your results.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;rmarkdown&lt;/code&gt; package offers a fair amount of flexibility for customizing your PowerPoint slides, such as having the ability to include R code, images, R visualizations, speaker notes, and customized column layout.&lt;/p&gt;
&lt;p&gt;To learn more about creating PowerPoint presentations with R, Yihui’s &lt;a href=&#34;https://bookdown.org/yihui/rmarkdown/powerpoint-presentation.html&#34;&gt;RMD: The Definitive Guide&lt;/a&gt; and RStudio’s article &lt;a href=&#34;https://support.rstudio.com/hc/en-us/articles/360004672913-Rendering-PowerPoint-Presentations-with-RStudio&#34;&gt;Rendering Powerpoint Presentations with RStudio&lt;/a&gt; are both great resources.&lt;/p&gt;

        &lt;script&gt;window.location.href=&#39;https://rviews.rstudio.com/2019/04/04/sharing-r-visualizations-in-powerpoint/&#39;;&lt;/script&gt;
      </description>
    </item>
    
  </channel>
</rss>
