class: center, middle, inverse, title-slide # Title ## Subtitle ###
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[![](https://graduateinstitute.ch/sites/default/files/styles/medium/public/2019-01/James%20Hollway.jpg?itok=1Yw0keum)] James Hollway (Instructor) ] --- ## You can also pull images (or text) to the left or right to build columns .pull-left[ .polaroid[![](https://graduateinstitute.ch/sites/default/files/styles/medium/public/2019-01/James%20Hollway.jpg?itok=1Yw0keum)] James Hollway (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[![:scale 75%](https://www.seekpng.com/png/detail/143-1435868_headshot-silhouette-person-placeholder.png) *Prof. Smith* Principal Investigator ]] .column[.pull-down[![:scale 75%](https://www.seekpng.com/png/detail/143-1435868_headshot-silhouette-person-placeholder.png) *Dr. Jones* Doctoral Research Assistant ]] .column[.pull-down[![:scale 75%](https://www.seekpng.com/png/detail/143-1435868_headshot-silhouette-person-placeholder.png) *Ms. Dupont* Research Assistant ]] .column[.pull-down[![:scale 75%](https://www.seekpng.com/png/detail/143-1435868_headshot-silhouette-person-placeholder.png) *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="03-slides_files/figure-html/unnamed-chunk-1-1.png" 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.10177531 0.09637108 0.78844928 0.65722594 0.44882536 ``` -- ```r rnorm(5) ``` ``` ## [1] -1.3474286 -0.1743010 0.1770405 2.6353774 1.1208293 ``` -- ```r rbinom(5, 1, 0.5) ``` ``` ## [1] 1 1 0 0 0 ``` -- ```r rcauchy(5) ``` ``` ## [1] -0.06322364 -0.83571134 0.19954174 18.77648316 -0.24606066 ``` --- class: center, middle ## Or you can highlight which section of your presentation you are up to... .pull-1[.circleoff[![](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/NYCS-bull-trans-1.svg/1024px-NYCS-bull-trans-1.svg.png)]] .pull-1[.circleon[![](https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/NYCS-bull-trans-2.svg/1200px-NYCS-bull-trans-2.svg.png)]] .pull-1[.circleoff[![](https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/NYCS-bull-trans-3.svg/1200px-NYCS-bull-trans-3.svg.png)]] --- 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/jhollway/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://bookdown.org/yihui/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/). .center[![Animation GIF](https://i.giphy.com/media/Oo6GWyiWEDgtO/giphy.webp)] --- background-image: url(https://media1.giphy.com/media/xT0BKiK5sOCVdBUhiM/giphy.gif) background-size: contain # And finally, you can add gifs! --- class: inverse iheid-red center middle with-logo logo-iheid_BW Made with `{iheiddown}`, the R-package for IHEID publications (Hollway, 2021). --- # References Hollway, J. (2021). _iheiddown: A package for writing IHEID documents in RMarkdown_. R package version 0.8.0. URL: [https://github.com/jhollway/iheiddown](https://github.com/jhollway/iheiddown).