class: center, middle, inverse, title-slide .title[ # Title ] .subtitle[ ## Subtitle ] .author[ ###
Author Name
] --- class: center, middle # With this template, it is very easy to build good looking slides ## and you can centre everything for title/section/other slides --- class: middle, inverse, iheid-red ## You can colour the background and add images using straightforward markdown syntax .center[ .polaroid[] Your Name (Instructor) ] --- ## You can also pull images (or text) to the left or right to build columns .pull-left[ .polaroid[] Your Name (Instructor) ] .pull-right[ I can add paragraphs of extra information... or a bullet list... - one - two - three or a numbered list... 1. one 1. two 4. three ] --- class: split-four, center # Present your team by slicing the slide up with ninjutsu! .column[.pull-down[ *Prof. Smith* Principal Investigator ]] .column[.pull-down[ *Dr. Jones* Doctoral Research Assistant ]] .column[.pull-down[ *Ms. Dupont* Research Assistant ]] .column[.pull-down[ *Mr. Dupond* Research Assistant ]] --- ## You can build a step-by-step reveal -- By using double dashes `--` to separate lines of text or code, we can build a slide up gradually. -- For example here is some more text... -- Or here is an example of some math... $$ X = \sum_i^n x_i $$ -- Or here is a quick plot built (and cached) when the Rmarkdown document is run: ``` r plot(iris) ``` <img src="index_files/figure-html/unnamed-chunk-1-1.png" alt="" width="504" /> --- class: highlight-last-item ## Add progressive lists Adding the class `highlight-last-item` allows you to highlight the last element of a progressive list. - First item -- - Second item -- - For more options, see the `iheid-xaringan-style.css` file and search for "progressive slides". This feature was based on [this great article](https://www.garrickadenbuie.com/blog/better-progressive-xaringan/?panelset2=r-markdown3&panelset=r-markdown&panelset1=slides2). --- class: show-only-last-code-result ## Progressive code Adding the class `show-only-last-code-result` allows you to render only the last code result. ``` r runif(5) ``` ``` ## [1] 0.8580229 0.9222489 0.9105532 0.8099005 0.9062593 ``` -- ``` r rnorm(5) ``` ``` ## [1] 0.7274330 0.5448435 0.5642051 1.3062287 1.1729354 ``` -- ``` r rbinom(5, 1, 0.5) ``` ``` ## [1] 1 1 1 1 0 ``` -- ``` r rcauchy(5) ``` ``` ## [1] -1.7881094 0.1776937 -8.9337052 1.6768555 -0.9118932 ``` --- class: center, middle ## Or you can highlight which section of your presentation you are up to... .pull-1[.circleoff[]] .pull-1[.circleon[]] .pull-1[.circleoff[]] --- class: left, middle .blockquote[You can add unquotable quotes ~ Some person] --- class: with-logo logo-iheid ## Add a logo to your presentation .pull-left[Adding a nice looking logo to your presentation is easy. Simply define the `with-logo` class alongside the class of the logo itself (`logo-iheid` in this case) on every slide you want the logo to appear. See [the presentation vignette](https://github.com/iheid-library/iheiddown) for a list of the included logos.] --- ## Add Maps ``` r library(leaflet) leaflet() %>% addTiles() %>% setView(6.1435, 46.2210, zoom = 17) ```
--- ## Add some tables ! With the addition of the excellent [`{xaringan_columns}`](https://github.com/emilyriederer/xaringan_columns) macros by Emily Riederer, you can create nice looking multicolumn tables using clean markdown code. ![:col_header Header 1, Header 2, Header 3, Header 4, Header 5] ![:col_list You can add rows with bulletted lists, item2, item3, hello, more content] ![:col_list item4, item5, Or normal chunks of text (see below), la la la, tra la la] ![:col_row More text, More text, ., More text, More text ] --- ## More tables; kable and kableExtra packages .pull-left[Kable: great features for displaying simple tables! ``` r knitr::kable(head(mtcars[1:4], 5), format = 'html') ``` <table> <thead> <tr> <th style="text-align:left;"> </th> <th style="text-align:right;"> mpg </th> <th style="text-align:right;"> cyl </th> <th style="text-align:right;"> disp </th> <th style="text-align:right;"> hp </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;"> Mazda RX4 </td> <td style="text-align:right;"> 21.0 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 160 </td> <td style="text-align:right;"> 110 </td> </tr> <tr> <td style="text-align:left;"> Mazda RX4 Wag </td> <td style="text-align:right;"> 21.0 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 160 </td> <td style="text-align:right;"> 110 </td> </tr> <tr> <td style="text-align:left;"> Datsun 710 </td> <td style="text-align:right;"> 22.8 </td> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 108 </td> <td style="text-align:right;"> 93 </td> </tr> <tr> <td style="text-align:left;"> Hornet 4 Drive </td> <td style="text-align:right;"> 21.4 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 258 </td> <td style="text-align:right;"> 110 </td> </tr> <tr> <td style="text-align:left;"> Hornet Sportabout </td> <td style="text-align:right;"> 18.7 </td> <td style="text-align:right;"> 8 </td> <td style="text-align:right;"> 360 </td> <td style="text-align:right;"> 175 </td> </tr> </tbody> </table> See [the knitr documentation](https://yihui.org/rmarkdown-cookbook/kable.html) for additional options. ] .pull-right[Want to get fancier? Use kableExtra! ``` r head(mtcars[1:4], 3) %>% kableExtra::kbl()%>% kableExtra::kable_material(c("hover", "striped", "condensed"), full_width = F) ``` <table class=" lightable-material lightable-striped lightable-hover" style="font-family: "Source Sans Pro", helvetica, sans-serif; width: auto !important; margin-left: auto; margin-right: auto;"> <thead> <tr> <th style="text-align:left;"> </th> <th style="text-align:right;"> mpg </th> <th style="text-align:right;"> cyl </th> <th style="text-align:right;"> disp </th> <th style="text-align:right;"> hp </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;"> Mazda RX4 </td> <td style="text-align:right;"> 21.0 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 160 </td> <td style="text-align:right;"> 110 </td> </tr> <tr> <td style="text-align:left;"> Mazda RX4 Wag </td> <td style="text-align:right;"> 21.0 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 160 </td> <td style="text-align:right;"> 110 </td> </tr> <tr> <td style="text-align:left;"> Datsun 710 </td> <td style="text-align:right;"> 22.8 </td> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 108 </td> <td style="text-align:right;"> 93 </td> </tr> </tbody> </table> See [the kableExtra documentation](https://cran.r-project.org/web/packages/kableExtra/vignettes/awesome_table_in_html.html) for additional options. ] --- ## Interactive tables; DT package ``` r library(DT) DT::datatable(head(mtcars, 10), fillContainer = FALSE, options = list(pageLength = 4)) ```
See the [DT package documentation](https://rstudio.github.io/DT/) for the additional options. --- class: animate__animated, animate__slideInRight ## Add slide transitions to your slides Simply add the class `animate__animated` and the class corresponding to the desired animation such as `animate__slideInRight`, et voilĂ ! For a complete list of the available animations and further options, visit [animate.style](https://animate.style/). --- class: inverse iheid-red center middle with-logo logo-iheid_BW Made with `{iheiddown}`, the R-package for IHEID publications (Hollway, 2021). --- # Use of generative AI The author used Tool name and version (Provider, Month Year) for describe each use. The author checked all output from these tools and takes full responsibility for the content of this document. --- # References Hollway, J. (2021). _iheiddown: A package for writing IHEID documents in RMarkdown_. R package version 0.8.0. URL: [https://github.com/iheid-library/iheiddown](https://github.com/iheid-library/iheiddown).