class: center, middle, inverse, title-slide .title[ # MTH 209 Data Manipulation and Management ] .subtitle[ ## Lesson 9: R Markdown Presentations ] .author[ ###
Ying-Ju Tessa Chen, PhD
Associate Professor
Department of Mathematics
University of Dayton
@ying-ju
ying-ju
ychen4@udayton.edu
] --- ## Learning Objectives In this session, we will learn 1. Rmarkdown Presentations 2. Flex Dashboard --- ## Rmarkdown Presentations - 1 In order to create a Rmarkdown presentation, we click <span Style="color:#3384FF">File</span> and then find <span Style="color:#3384FF">New File</span> and then <span Style="color:#3384FF">R markdown ...</span> There are four options: - Html (ioslides): This format allows us to create a slide show and the slides could be broken up into sections by using the heading tags # and ##. If a header is not needed, a new slide could be created using a horizontal rule (- - -). - Html (Slidy): Similar to ioslides, this format allows to create a slide show broken up into sections by using the heading tag ##. If a header is not needed, a new slide could be created using a horizontal rule (- - -). A Slidy presentation gives a table of content while An ioslides presentation doesn't. - PDF (beamer): This format allows to create a beamer presenation (LaTex). The slides could be broken up into sections by using the heading tags # and ##. If a header is not needed, a new slide could be created using a horizontal rule (- - -). - PowerPoint --- ## Rmarkdown Presentations - 2 <div class="figure" style="text-align: center"> <img src="data:image/png;base64,#../Figures/presentation.JPG" alt="Creating a Rmarkdown Presentation" width="50%" /> <p class="caption">Creating a Rmarkdown Presentation</p> </div> --- ## Rmarkdown Presentations - 3 In the following, we show an example of the header of a Rmarkdown file. <img src="data:image/png;base64,#../Figures/Rmarkdown_heading.JPG" width="40%" style="display: block; margin: auto;" /> We can use the output option to manipulate which presentation we would like to have. - output: ioslides_presentation - output: slidy_presentation - output: beamer_presentation - output: powerpoint_presentation To render an R Markdown document into its final output format, we can click the <span Style="color:#3384FF">Knit</span> button to render the document in RStudio and RStudio will show a preview of it. The further settings for presentations could be found at [R Markdown: The Definitive Guide](https://bookdown.org/yihui/rmarkdown/presentations.html) --- ## xaringan Presentation A easy way to start creating a xaringan presentation is to use the R markdown template with <span Style="color:#3384FF">Ninja Presentation</span> or <span Style="color:#3384FF">Ninja Themed Presentation</span>. <div class="figure" style="text-align: center"> <img src="data:image/png;base64,#../Figures/xaringan.JPG" alt="Creating a Rmarkdown Presentation" width="30%" /> <p class="caption">Creating a Rmarkdown Presentation</p> </div> A comprehensive tutorial regarding xaringan presentation could be found at [xaringan Presentation](https://bookdown.org/yihui/rmarkdown/xaringan.html) --- ## Flex Dashboard A easy way to start creating a Flex dashboard is to use the R markdown template with <span Style="color:#3384FF">Flex Dashboard</span>. <div class="figure" style="text-align: center"> <img src="data:image/png;base64,#../Figures/dashboard.JPG" alt="Creating a Flex Dashboard" width="30%" /> <p class="caption">Creating a Flex Dashboard</p> </div> - We can use # to create multiple pages. - We can use <span Style="color:#3384FF">orientation</span> in the <span Style="color:#3384FF">output</span> options to specify the layout to be <span Style="color:#3384FF">columns</span> or <span Style="color:#3384FF">rows</span>. A comprehensive tutorial regarding Flex Dashboard could be found at [flexdashboard](https://pkgs.rstudio.com/flexdashboard/) --- # Summary of Main Points By now, you should know how to create different types of presentation such as - ioslides - Slidy - beamer - Powerpoint - xaringan - Flex Dashboard --- # Supplementary Materials Here are some useful supplementary materials for self-learning. .pull-left[ .center[[<img src="https://r4ds.hadley.nz/cover.jpg" height="250px">](https://r4ds.hadley.nz)] .small[ * [Data Visualization](https://r4ds.hadley.nz/data-visualize) ] ] .pull-right[ .center[[<img src="../Figures/RPubs.png" height="250px">](https://RPubs.com)] .small[ * [Visualizations with ggplot2 1](https://rpubs.com/chrisbrunsdon/UG_ggplot) * [Visualization with ggplot2 2](https://rpubs.com/Cisco_Self_Serve/318832) ] ]