class: center, middle, inverse, title-slide # Presentation title ## Presentation subtitle (if any) ### Team name
Names of team members ### Duke University ### 2021-09-13 --- class: inverse, middle, center # Using xaringan --- ## xaringan - The presentation is created using the `xaringan` package - Use `---` to separate slides and `--` for incremental builds -- - Like this --- ## Layouts You can use plain text - or bullet points .pull-left[ or text in two columns `\(^*\)` ] .pull-right[ - like - this ] .footnote[ [*] And add footnotes ] --- ## Code ```r # a boring regression model <- lm(dist ~ speed, data = cars) tidy(model) ``` ``` ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## <chr> <dbl> <dbl> <dbl> <dbl> ## 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 ## 2 speed 3.93 0.416 9.46 1.49e-12 ``` ```r glance(model) ``` ``` ## # A tibble: 1 × 12 ## r.squared adj.r.squared sigma statistic p.value df logLik AIC BIC ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 0.651 0.644 15.4 89.6 1.49e-12 1 -207. 419. 425. ## # … with 3 more variables: deviance <dbl>, df.residual <int>, nobs <int> ``` --- ## Plots <img src="presentation_files/figure-html/plot-penguins-1.png" title="Body mass vs. flipper lenght of Palmer Penguins for species Adelie and all the others combined together. There is a relatively strong, positive relationship between the two variables. The Adelie penguins are clustered together but they don't exhibit a different trend than the rest of the penguins." alt="Body mass vs. flipper lenght of Palmer Penguins for species Adelie and all the others combined together. There is a relatively strong, positive relationship between the two variables. The Adelie penguins are clustered together but they don't exhibit a different trend than the rest of the penguins." width="70%" /> --- ## Plot and text .pull-left[ - Some text - goes here ] .pull-right[ <img src="presentation_files/figure-html/unnamed-chunk-1-1.png" width="100%" /> ] --- class: inverse, middle, center # A new section... --- ## Tables If you want to generate a table, make sure it is in the HTML format (instead of Markdown or other formats), e.g., <table> <thead> <tr> <th style="text-align:left;"> species </th> <th style="text-align:left;"> island </th> <th style="text-align:right;"> bill_length_mm </th> <th style="text-align:right;"> bill_depth_mm </th> <th style="text-align:right;"> flipper_length_mm </th> <th style="text-align:right;"> body_mass_g </th> <th style="text-align:left;"> sex </th> <th style="text-align:right;"> year </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;"> Adelie </td> <td style="text-align:left;"> Torgersen </td> <td style="text-align:right;"> 39.1 </td> <td style="text-align:right;"> 18.7 </td> <td style="text-align:right;"> 181 </td> <td style="text-align:right;"> 3750 </td> <td style="text-align:left;"> male </td> <td style="text-align:right;"> 2007 </td> </tr> <tr> <td style="text-align:left;"> Adelie </td> <td style="text-align:left;"> Torgersen </td> <td style="text-align:right;"> 39.5 </td> <td style="text-align:right;"> 17.4 </td> <td style="text-align:right;"> 186 </td> <td style="text-align:right;"> 3800 </td> <td style="text-align:left;"> female </td> <td style="text-align:right;"> 2007 </td> </tr> <tr> <td style="text-align:left;"> Adelie </td> <td style="text-align:left;"> Torgersen </td> <td style="text-align:right;"> 40.3 </td> <td style="text-align:right;"> 18.0 </td> <td style="text-align:right;"> 195 </td> <td style="text-align:right;"> 3250 </td> <td style="text-align:left;"> female </td> <td style="text-align:right;"> 2007 </td> </tr> <tr> <td style="text-align:left;"> Adelie </td> <td style="text-align:left;"> Torgersen </td> <td style="text-align:right;"> NA </td> <td style="text-align:right;"> NA </td> <td style="text-align:right;"> NA </td> <td style="text-align:right;"> NA </td> <td style="text-align:left;"> NA </td> <td style="text-align:right;"> 2007 </td> </tr> <tr> <td style="text-align:left;"> Adelie </td> <td style="text-align:left;"> Torgersen </td> <td style="text-align:right;"> 36.7 </td> <td style="text-align:right;"> 19.3 </td> <td style="text-align:right;"> 193 </td> <td style="text-align:right;"> 3450 </td> <td style="text-align:left;"> female </td> <td style="text-align:right;"> 2007 </td> </tr> <tr> <td style="text-align:left;"> Adelie </td> <td style="text-align:left;"> Torgersen </td> <td style="text-align:right;"> 39.3 </td> <td style="text-align:right;"> 20.6 </td> <td style="text-align:right;"> 190 </td> <td style="text-align:right;"> 3650 </td> <td style="text-align:left;"> male </td> <td style="text-align:right;"> 2007 </td> </tr> </tbody> </table> --- ## Images <div class="figure" style="text-align: center"> <img src="img/watercolour_sys02_img32_percolate.jpg" alt="Image credit: Danielle Navarro, Percolate." width="40%" /> <p class="caption">Image credit: Danielle Navarro, Percolate.</p> </div> Or you can also include a full page image. See next slide. --- background-image: url(img/watercolour_sys02_img32_percolate.jpg) --- ## Math Expressions You can write LaTeX math expressions inside a pair of dollar signs, e.g. $\alpha+\beta$ renders `\(\alpha+\beta\)`. You can use the display style with double dollar signs: ``` $$\bar{X}=\frac{1}{n}\sum_{i=1}^nX_i$$ ``` `$$\bar{X}=\frac{1}{n}\sum_{i=1}^nX_i$$` Limitations: 1. The source code of a LaTeX math expression must be in one line, unless it is inside a pair of double dollar signs, in which case the starting `$$` must appear in the very beginning of a line, followed immediately by a non-space character, and the ending `$$` must be at the end of a line, led by a non-space character; 1. There should not be spaces after the opening `$` or before the closing `$`. 1. Math does not work on the title slide (see [#61](https://github.com/yihui/xaringan/issues/61) for a workaround). --- class: inverse, middle, center # Wrap up --- ## Feeling adventurous? - Want to find out more about `xaringan`? See https://slides.yihui.name/xaringan/#1. - You are welcomed to use the default styling of the slides. In fact, that's what I expect majority of you will do. You will differentiate yourself with the content of your presentation. - But some of you might want to play around with slide styling. The `xaringanthemer` provides some solutions for this that: https://pkg.garrickadenbuie.com/xaringanthemer. - And if you want more bells and whistles, there is also `xaringanExtra`: https://pkg.garrickadenbuie.com/xaringanExtra.