class: title-slide, right, top background-image: url(img/hex-xaringan.png), url(img/frame-art.png) background-position: 90% 75%, 75% 75% background-size: 8%, cover .right-column[ # Sharing Your Work<br>with xaringan ### An Introduction to xaringan:<br>The Basics **Silvia CanelΓ³n, Ph.D.**<br> Nov. 3rd, 2020 — Day 1 ] .palegrey[.left[.footnote[Graphic by [Vernon Adams](https://www.rawpixel.com/image/575297/artistic-canvas-background-template)]]] ??? Welcome to the workshop on sharing your work with xaringan. Where I'll show you how to create impressive presentation slides that can be deployed to the web for easy sharing. --- name: about-me layout: false class: about-me-slide, inverse, middle, center # About me <img style="border-radius: 50%;" src="https://silvia.rbind.io/authors/silvia/avatar.png" width="150px"/> ## Silvia CanelΓ³n ### Postdoctoral Research Scientist .fade[University of Pennsylvania<br>Philadelphia, PA, USA] [
silvia.rbind.io](https://silvia.rbind.io) [
Twitter
@spcanelon](https://twitter.com/spcanelon) [
GitHub
@spcanelon](https://github.com/spcanelon) --- layout: true <a class="footer-link" href="http://bit.ly/xaringan-nhsr">bit.ly/xaringan-nhsr — Silvia CanelΓ³n</a> <!-- this adds the link footer to all slides, depends on footer-link class in css--> --- class: top # Acknowledgments .pull-left-narrow[.center[<img style="border-radius: 50%;" src="https://lauriebaker.rbind.io/author/dr.-laurie-baker/avatar_hu30116ce9545207e6cc07ea892252ff02_106302_270x270_fill_q90_lanczos_center.jpg" width="100px"/>]] .pull-right-wide[ [Laurie Baker](https://lauriebaker.rbind.io), co-pilot for this workshop and Data Science Lecturer at the Data Science Campus, Office for National Statistics, UK.as ] -- .pull-left-narrow[.center[ <img style="border-radius: 50%;" src="https://avatars0.githubusercontent.com/u/53170984?s=200&v=4" width="125px"/>]] .pull-right-wide[ [NHS-R Community](https://nhsrcommunity.com/) for the opportunity to provide this workshop - [NHSRtheme π¦](https://github.com/nhs-r-community/NHSRtheme) developed by Tom Jemmett - [NHSRdatasets π¦](https://github.com/nhs-r-community/NHSRdatasets) developed by Chris Mainey ] -- .pull-left-narrow[.center[ <br>
]] .pull-right-wide[ - [xaringan π¦](https://github.com/yihui/xaringan#xaringan) developed by Yihui Xie - [xaringanExtra π¦](https://github.com/gadenbuie/xaringanExtra/#xaringanExtra) developed by Garrick Aden-Buie - Materials developed by [Alison Hill](https://twitter.com/apreshill) that have inspired and informed this workshop ] --- class: left # About you -- .pull-left-narrow[ .center[
]] .pull-right-wide[### you know Markdown] -- .pull-left-narrow[.center[ <img src="https://raw.githubusercontent.com/rstudio/hex-stickers/master/PNG/rmarkdown.png" width="25%"/>]] .pull-right-wide[### you know R Markdown] -- .pull-left-narrow[ .center[
]] .pull-right-wide[### .my-gold[**you want to know about cool HTML5 slides**]] --- name: question class: inverse, middle, center {{content}} --- template: question
# How do we make<br>cool HTML5 slides? --- ## It takes a team .panelset[ .panel[.panel-name[remark.js] .pull-left[ .center[
<br> JavaScript **and**
<br> Markdown ] ] .pull-right[ > .my-coral[A simple, in browser, Markdown driven slideshow tool] .fade[targeted at people who know their way around HTML and CSS] <iframe src="https://remarkjs.com" width="100%" height="250px" data-external="1"></iframe> ] ] <!----> .panel[.panel-name[xaringan] .pull-left[ .center[ ![:scale 25%](img/hex-xaringan.png) **xaringan** is a package that introduces `remark.js` to R Markdown ![:scale 15%](img/hex-rmarkdown.png) ]] .pull-right[ <iframe src="https://slides.yihui.org/xaringan" width="100%" height="400px" data-external="1"></iframe> ] ] <!----> .panel[.panel-name[CSS] **CSS** stands for **C**ascading **S**tyle **S**heet, and turns .pull-left[ functional, but dull HTML (content)... ![:scale 95%](img/title-slide-no-css.png) ] .pull-right[ ...into HTML (content) with style! π ![:scale 95%](img/title-slide.png) ] ] <!----> ] <!--end of panelset--> ??? Remark helps us: - create a new slide (Markdown syntax* and slide properties); - format a slide (e.g. text alignment); - configure the slideshow; - and use the presentation (keyboard shortcuts). --- # CSS for the <img src="https://nhsrcommunity.com/wp-content/uploads/2018/02/logo.png" width="13%"/> .pull-left[ <iframe src="https://spcanelon.github.io/xaringan-basics-and-beyond/nhsr-theme/sample-4-3.html" width="100%" height="400px" data-external="1"></iframe> ] .pull-right[ I designed a custom CSS theme for the NHS-R Community following the [NHS identity guidelines](https://www.england.nhs.uk/nhsidentity/identity-guidelines/) π. [Tom Jemmett](https://github.com/tomjemmett) helped me incorporate it into the [NHSRtheme π¦](https://github.com/nhs-r-community/NHSRtheme#nhs-r-theme-) in preparation for this workshop. ] --- ## Getting started .panelset[ .panel[.panel-name[NHSRtheme] **Step 1.** Install the `NHSRtheme` package from GitHub ```r # install.packages("devtools") devtools::install_github("nhs-r-community/NHSRtheme") ``` **Step 2.** Load the `NHSRtheme` package ```r library(NHSRtheme) ``` ] <!----> .panel[.panel-name[New Rmd File] .pull-left[ 1. New File 2. New R Markdown ![:scale 90%](img/new-r-markdown.png) ] .pull-right[ 3\. From Template
NHS-R Presentation<br>4. Give your slide deck a name! ![:scale 85%](img/NHSRtheme-template.png) ] ]<!----> .panel[.panel-name[Directory] The new directory in the "Files" pane contains .left[ +
the new Rmd file (i.e. `my-slides.Rmd`) +
the `img` folder containing logo files +
the `css` folder containing the custom `nhsr` theme files<br>.small[and an HTML file in charge of [adding the NHS logo to each slide](https://www.garrickadenbuie.com/blog/xaringan-tip-logo-all-slides)] ] ] <!----> .panel[.panel-name[YAML 1] ```r title: "Presentation title" subtitle: "Presentation subtitle" author: "Author Name" institute: "NHS Organisation" date: "Presentation Date" output: xaringan::moon_reader: # new kind of output! css: -default # default xaringan theme CSS file -css/nhsr.css # custom primary CSS file -css/nhsr-fonts.css # custom font CSS file ``` ] <!----> .panel[.panel-name[YAML 2] More options for output `xaringan::moon_reader` ```r lib_dir: libs # creates directory for libraries seal: false # false: custom title slide nature: highlightStyle: googlecode # highlighting syntax for code highlightLines: true # true: enables code line highlighting highlightLanguage: ["r"] # languages to highlight countIncrementalSlides: false # false: disables counting of incremental slides ratio: "16:9" # 4:3 for standard size includes: after_body: [css/insert-logo.html] # adds NHS logo to slides (you can ignore it) ``` ] <!----> .panel[.panel-name[Extra info] - `seal: true` creates a title slide with inverse colors using metadata from your YAML - Other [highlightStyle options](https://github.com/gnab/remark/wiki/Configuration#highlighting) from **remark.js** are: + `arta`, `ascetic`, `dark`, `default`, `far`, `github`, `googlecode`, `idea`, `ir-black`, `magula`, `monokai`, `rainbow`, `solarized-dark`, `solarized-light`, `sunburst`, `tomorrow`, `tomorrow-night-blue`, `tomorrow-night-bright`, `tomorrow-night`, `tomorrow-night-eighties`, `vs`, `zenburn`. ] <!----> ] <!--end of panelset--> --- name: live-coding background-color: var(--my-yellow) class: middle, center
# Let's try it live together --- ## Our first few slides
Slide content starts immediately after the YAML `---` .pull-left-narrow[ The .my-coral[NHSRtheme] xaringan template comes pre-loaded with a few things ] .pull-right-wide[ - .my-coral[A `setup` chunk] with a few libraries and some chunk options set for the whole slide deck - Some example slides separated by three dashes (`---`) 1. .my-coral[Title slide with the `title-slide` class.]<br>Content is aligned with the `left` and the `bottom` of the slide 1. .my-coral[Inverse slide with the `inverse` slide class.]<br>Content is aligned with `middle` and `center` of the slide 1. .my-coral[Incremental slides with no specified slide class (default).]<br>Incremental steps are made using two dashes (`--`), and bullet points made using markdown (`*`) ] --- .panelset[ .panel[.panel-name[Moon Reader] To view the slides generated by your new Rmd file, you have two options: **Option 1**. Run xaringan's infinite moon reader function in the console π ```r xaringan::inf_mr() ``` > .small[Note: you can also access this feature using the IDE toolbar: **Addins > XARINGAN Infinite Moon Reader**] **Option 2**. Knit the document π§Ά ] <!----> .panel[.panel-name[Setup chunk] .pull-left-narrow[ A `setup` chunk with a few libraries and some chunk options set for the whole slide deck ] .pull-right-wide[ ![](img/code-setup-chunk.png) ] ] <!----> .panel[.panel-name[Title slide] .pull-left[ ### Code ![](img/code-title-slide.png) This is the very first slide after the YAML so it doesn't need to begin with `---`] .pull-right[ ### Slide <img src="img/sample-title-slide.png" width="100%" style="border:2px solid #E8EDEE"/> ] ] <!----> .panel[.panel-name[Inverse slide] .pull-left[ ### Code ![](img/code-inverse-slide.png)] .pull-right[ ### Slide <img src="img/sample-inverse-slide.png" width="100%" style="border:0px solid #E8EDEE"/> ] ] <!----> .panel[.panel-name[Incremental slides] .pull-left[ ### Code ![](img/code-incremental-slides.png)] .pull-right[ ### Slide <img src="img/sample-incremental-slides.png" width="100%" style="border:2px solid #E8EDEE"/> ] ] <!----> ]<!--end of panelset--> --- # xaringan syntax ### What did you notice? ??? What about the syntax used in the R Markdown file looked familiar? Please type your answers in the chat box. -- .pull-left[ ### Familiar from **markdown** - Headings (#, ##, ###) - **Bold** and _italic_ type - Links and images with `[]()` and `![]()` - Bullet points can be added<br>with `-`, `+`, or `*` - Numbered lists can be created<br>with `1.` ] ??? What about the syntax looked new or different? Please type your answers in the chat box. -- .pull-right[ ### Not so familiar, from **remark.js** - First slide starts immediately after YAML, doesn't need to begin with three dashes(`---`) - Slides are separated by<br>three dashes (`---`) - Incremental slides are separated by<br>two dashes (`--`) - Slide content is separated from presenter notes by three questions marks (`???`) ] --- template: question
# How can we make our slides<br>look more interesting??? -- ---- .left-col[.center[
### with placement ]] -- .center-col[ .center[
### pretty pictures ]] -- .right-col[.center[
### and icons ]] --- name: placement ## Placement <i class="fas fa-th-large" style = "float: right"></i> --- template: placement ### Align an entire slide .left-column[ Horizontally ```r left, *center, right ``` ---- Vertically ```r top, *middle, bottom ``` ] -- .right-column[ ```r --- *class: center, middle # Slide with centered content in the middle This content is also centered and in the middle of the slide --- ``` .right[.my-coral[example on next slide
]] ] --- class: center, middle # Slide with centered content and aligned with the middle This content is also centered and aligned with the middle of the slide --- template: placement ### Align only some text .left-column[ Horizontal only ```r *.left[words] .center[words] *.right[words] ``` ] -- .right-column[ ```r --- class: center, middle # Slide with some text aligned *.left[We can start writing a sentence on the left...] *.right[...and finish it on the right.] --- ``` .right[.my-coral[example on next slide
]] ] --- class: center, middle # Slide with some text aligned .left[We can start writing a sentence on the left...] .right[...and finish it on the right.] --- template: placement ### Pull content to either side of the slide .pull-left[ **The `.pull-left[]` class pulls content to<br>the left 47%** Like the text above and<br>the hex sticker below ![:scale 25%](img/hex-rmarkdown.png) ] -- .pull-right[ **And `.pull-right[]` pulls content to<br>the right 47%** You've already seen these content classes<br>in action today π <br> ![:scale 30%](img/hex-xaringan.png) ] -- They don't have to take up the entire slide. Like for this text, you can decide to continue creating content that isn't pulled to either side. --- template: placement ### Arrange content into a two-column layout .left-column[ **`.left-column[]` places content into a column 20% wide** And text is a little lighter ] -- .right-column[ **`.right-column[]` places content into a column 75% wide** - It also has a _little_ bit of padding on the top - And unlike the `.pull` content classes, these column classes are fixed for the entire slide - They are meant to be used together .center[ ![:scale 15%](img/hex-xaringan.png)] ] --- name: pictures ## Pictures <i class="fas fa-image" style = "float: right"></i> --- template: pictures There are a variety of ways to add images to your slides! .panelset[ .panel[.panel-name[Markdown] .pull-left[ ```markdown ![](img/camera-green.jpg) ``` - simple - not very flexible - output size fully dependent on the size of the image, but scaling can be managed [using custom macros (JavaScript functions) ](https://slides.yihui.org/xaringan/#33) .small[ Photo by [Annie Spratt](https://unsplash.com/@anniespratt)] ] .pull-right[ ![](img/camera-green.jpg) ] ] <!----> .panel[.panel-name[knitr] .pull-left[ ```r knitr::include_graphics("img/camera-green.jpg") ``` - pretty flexible - a little bulky - more options [here](https://www.rdocumentation.org/packages/knitr/versions/1.30/topics/include_graphics) ] .pull-right[ <img src="img/camera-green.jpg" width="90%" /> ] ] <!----> .panel[.panel-name[HTML] .pull-left[ ```html <img src="img/camera-green.jpg" width="90%"/> ``` - most flexible - a bit unsightly - takes time to [get used to syntax](https://www.w3schools.com/html/html_images.asp) .small[**Tip:** To insert an avatar: ```html <img src="https://insertweblink.here" width="170px" style="border-radius: 50%;"/> ``` ] ] .pull-right[ <img src="img/camera-green.jpg" width="90%"/> ] ] <!----> --- .panel[.panel-name[Image sources] Below you'll see a few places where you can find beautiful and free background images contributed by artists all over world. **Tip:** You can use the `.footnote[]` class to credit the source of the image ([example here](https://spcanelon.github.io/xaringan-basics-and-beyond/slides/day-01-basics.html)) π .pull-left[ - [unsplash.com](unsplash.com) - [rawpixel.com](rawpixel.com) - [pexels.com](https://www.pexels.com/) ] .pull-right[ > - In the public domain<br> (no attribution necessary) > - Free with attribution<br> (e.g. Photo by [Annie Spratt](https://unsplash.com/@anniespratt)) ] ] <!----> .panel[.panel-name[Image paths] .pull-left[ R Markdown and xaringan don't always agree on where images are located<br>(i.e. relative file paths). You might find that `knitr::include_graphics()` produces an image from a code chunk in your Rmd, and that the same image may not show up when you render your xaringan slides. π€·ββ ] .pull-right[ I recommend using this directory structure to help avoid confusion<br>(example file path: `img/camera-green.jpg`) ```r . βββ css *βββ img * βββ camera-green.jpg βββ libs βββ my-slides.Rmd βββ my-slides.html ``` ] ] .panel[.panel-name[Background] You can use the [background-image property](https://github.com/gnab/remark/wiki/Markdown#background-image) underneath the `---` slide separator - `background-image:` - `url(https://insertweblink.here)` --> image from the web - `url(img/camera-green.jpg)` --> local image, using relative file paths - `background-size:` - `cover` --> rescales + crops with no empty space - `contain` --> rescales only - `background-position:` play with [this](https://css-tricks.com/almanac/properties/b/background-position/) .right[.my-coral[`background-size` examples in action!
]] ] <!----> ] <!--end of panelset--> --- background-image: url(img/camera-green.jpg) class: inverse, middle, center # **No background-size** **Image size: 3999x3005** --- background-image: url(img/camera-green.jpg) background-size: cover class: inverse, middle, center # **Cover** --- background-image: url(img/camera-green.jpg) background-size: contain background-color: white class: inverse, middle, center # **Contain** --- class: left name: icons ## Icons <i class="fas fa-star" style = "float: right"></i> -- .pull-left-narrow[.center[ π<br> [Emojis](https://github.com/hadley/emo#emoji) ]] .pull-right-wide[ Use the [emo(ji) π¦](https://github.com/hadley/emo#emoji):<br> Icon on the left: ` r emo::ji("smile")` (surrounded by backticks ` `` `) ] -- .pull-left-narrow[.center[
<br> [FontAwesome](https://fontawesome.com/icons?d=gallery&c=medical&m=free) ]] .pull-right-wide[ Use the [fontawesome π¦](https://rstudio.github.io/fontawesome/index.html): ` r fontawesome::fa("brain")` ] -- .pull-left-narrow[.center[ <svg viewBox="0 0 384 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g label="icon" id="layer6" groupmode="layer"> <path id="path2" d="M 120.19265,177.73779 C 123.18778,77.35076 64.277527,63.999998 64.277527,63.999998 v 31.26245 C 40.834519,83.611374 18.32863,81.929634 18.32863,81.929634 V 337.10903 c 0,0 98.10414,-11.41744 98.10414,84.40952 0,0 36.58424,-153.37442 248.86103,26.48145 0,-61.59342 0.37757,-216.93925 0.37757,-268.28471 C 169.9561,37.131382 120.1931,177.73779 120.1931,177.73779 Z m 187.20631,173.82056 -12.37599,-97.65441 h -0.448 l -40.72819,97.65441 h -17.55994 l -38.9362,-97.65441 h -0.448 l -14.17589,97.65441 h -43.87514 l 28.8015,-169.61925 h 43.42716 l 34.43518,90.6496 36.46566,-90.6496 h 43.87513 l 25.6817,169.61925 h -44.13938 z" style="stroke-width:0.0675239"></path> </g></svg><br> [Academicons](https://jpswalsh.github.io/academicons/) ]] .pull-right-wide[ The easiest way to access them is with the [icons π¦](https://pkg.mitchelloharawild.com/icons/):<br>` r icons::academicons("pubmed")` ] -- .pull-left-narrow[.center[ <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <title></title> <path d="M452.32,365,327.4,167.12A48.07,48.07,0,0,1,320,141.48V64h15.56c8.61,0,16-6.62,16.43-15.23A16,16,0,0,0,336,32H176.45c-8.61,0-16,6.62-16.43,15.23A16,16,0,0,0,176,64h16v77.48a47.92,47.92,0,0,1-7.41,25.63L59.68,365a74,74,0,0,0-2.5,75.84C70.44,465.19,96.36,480,124.13,480H387.87c27.77,0,53.69-14.81,66.95-39.21A74,74,0,0,0,452.32,365ZM211.66,184.2A79.94,79.94,0,0,0,224,141.48V68a4,4,0,0,1,4-4h56a4,4,0,0,1,4,4v73.48a79.94,79.94,0,0,0,12.35,42.72l57.8,91.53A8,8,0,0,1,351.37,288H160.63a8,8,0,0,1-6.77-12.27Z"></path></svg><br> [Ionicons](https://ionicons.com/) ]] .pull-right-wide[ I haven't had as much luck with these, but you can use the icons π¦ here as well: ` r icons::ionicons("flask")` ] --- name: your-turn background-color: var(--my-red) class: inverse .left-column[ ## Your turn<br>
<br> ### .my-pink[10:00 mins] ] .right-column[ ### Make an "about me" slide ---- Think about including details like your<br>name, affiliation, location, and/or contact information Here are some options to consider - practice [moving content around](#placement) the slide - separate content with a horizontal bar `----` - [add an image](#pictures) or photo - link to sites and/or social media - add some [icons](#icons)! - see [my about me slide](#about-me) for ideas ] --- template: question
# What about R content? -- ---- .pull-left[.center[
### tables ]] -- .pull-right[ .center[
### plots ]] --- name: tables ## Tables <i class="fas fa-table" style = "float: right"></i> --- template: tables ### Direct output ---- ```r NHSRdatasets::LOS_model %>% head() ## # A tibble: 6 Γ 5 ## ID Organisation Age LOS Death ## <int> <ord> <int> <int> <int> ## 1 1 Trust1 55 2 0 ## 2 2 Trust2 27 1 0 ## 3 3 Trust3 93 12 0 ## 4 4 Trust4 45 3 1 ## 5 5 Trust5 70 11 0 ## 6 6 Trust6 60 7 0 ``` .footnote[We're using the [NHSRdatasets π¦](https://github.com/nhs-r-community/NHSRdatasets#nhs-r-community-datasets-) here! It was developed by Chris Mainey and contains a few datasets to use for practice.] --- template: tables ### HTML table ---- .pull-left[ ```r NHSRdatasets::LOS_model %>% head() %>% knitr::kable(format = "html") ``` ] .pull-right[ <table> <thead> <tr> <th style="text-align:right;"> ID </th> <th style="text-align:left;"> Organisation </th> <th style="text-align:right;"> Age </th> <th style="text-align:right;"> LOS </th> <th style="text-align:right;"> Death </th> </tr> </thead> <tbody> <tr> <td style="text-align:right;"> 1 </td> <td style="text-align:left;"> Trust1 </td> <td style="text-align:right;"> 55 </td> <td style="text-align:right;"> 2 </td> <td style="text-align:right;"> 0 </td> </tr> <tr> <td style="text-align:right;"> 2 </td> <td style="text-align:left;"> Trust2 </td> <td style="text-align:right;"> 27 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 0 </td> </tr> <tr> <td style="text-align:right;"> 3 </td> <td style="text-align:left;"> Trust3 </td> <td style="text-align:right;"> 93 </td> <td style="text-align:right;"> 12 </td> <td style="text-align:right;"> 0 </td> </tr> <tr> <td style="text-align:right;"> 4 </td> <td style="text-align:left;"> Trust4 </td> <td style="text-align:right;"> 45 </td> <td style="text-align:right;"> 3 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:right;"> 5 </td> <td style="text-align:left;"> Trust5 </td> <td style="text-align:right;"> 70 </td> <td style="text-align:right;"> 11 </td> <td style="text-align:right;"> 0 </td> </tr> <tr> <td style="text-align:right;"> 6 </td> <td style="text-align:left;"> Trust6 </td> <td style="text-align:right;"> 60 </td> <td style="text-align:right;"> 7 </td> <td style="text-align:right;"> 0 </td> </tr> </tbody> </table> ] --- template: tables ### DT table ---- ```r NHSRdatasets::LOS_model %>% head() %>% DT::datatable() ```
--- template: tables exclude: true ### GT table ---- .pull-left[ ```r NHSRdatasets::LOS_model %>% head() %>% gt::gt() ``` ] .pull-right[
ID
Organisation
Age
LOS
Death
1
Trust1
55
2
0
2
Trust2
27
1
0
3
Trust3
93
12
0
4
Trust4
45
3
1
5
Trust5
70
11
0
6
Trust6
60
7
0
] .footnote[Make sure to check out the [GT package workshop](https://github.com/nhs-r-community/Conference_2020#workshop-sessions) tomorrow!] --- name: plots ## Plots <i class="fas fa-chart-bar" style = "float: right"></i> --- template: plots name: plot-right .pull-left[ ### Code ---- ```r NHSRdatasets::LOS_model %>% ggplot(aes(x = Age, y = Organisation)) + geom_boxplot(aes(fill = Organisation)) + NHSRtheme::scale_fill_nhs("highlights") ``` ] .pull-right[ ### Plot ---- ![](day-01-basics_files/figure-html/unnamed-chunk-20-1.png)<!-- --> ] .footnote[Note the use of the [NHSRtheme π¦](https://github.com/nhs-r-community/NHSRtheme#nhs-r-theme-) here! It was developed by Tom Jemmett and contains a few different colour palettes based on the NHS identity guidelines] --- template: plots name: alison-tips ### Creating side-by-side code + plot ---- Here's how to leverage code chunk options to avoid repeating your code<sup1/sup>: 1. Code on left, plot on right ([example](#plot-right)) - Chunk 1: `{r plot-right, fig.show = 'hide'}` - Chunk 2: `{r ref.label = 'plot-right', echo = FALSE}` 2. Plot on left, code on right - Chunk 1: `{r plot-left, echo = FALSE}` - Chunk 2: `{r ref.label = 'plot-left', fig.show = 'hide'}` .small[ These and more great tips in Alison Hill's [Teaching in Production](https://rstudio-education.github.io/teaching-in-production/slides/index.html#46) ] --- name: your-turn background-color: var(--my-red) class: inverse .left-column[ ## Your turn<br>
<br> ### .my-pink[10:00 mins] ] .right-column[ ### Make a new slide and practice<br>adding some R content ---- Here are some options to consider - add a [table](#tables) - add a [plot](#plots) - try [arranging content](#alison-tips) to have code on one side and the output on the other ] --- template: live-coding ### Let's try deploying slides to GitHub! --- class: goodbye-slide, inverse, middle, left .pull-left[ <img style="border-radius: 50%;" src="https://silvia.rbind.io/authors/silvia/avatar.png" width="170px"/> # Thank you! ### Here's where you can find me... .right[ [silvia.rbind.io
](https://silvia.rbind.io)<br/> [@spcanelon
Twitter
](https://twitter.com/spcanelon)<br/> [@spcanelon
GitHub
](https://github.com/spcanelon)<br/> ]]