class: title-slide, left, bottom

library(knitr)
library(tidyverse)
library(NHSRtheme)
library(NHSRdatasets)
# set default options
opts_chunk$set(echo = FALSE,
               fig.width = 7.252,
               fig.height = 4,
               dpi = 300)
# disabled for github actions
# opts_chunk$set(dev.args = list(type = "cairo"))

# uncomment the following lines if you want to use the NHS-R theme colours by default
# scale_fill_continuous <- partial(scale_fill_nhs, discrete = FALSE)
# scale_fill_discrete <- partial(scale_fill_nhs, discrete = TRUE)
# scale_colour_continuous <- partial(scale_colour_nhs, discrete = FALSE)
# scale_colour_discrete <- partial(scale_colour_nhs, discrete = TRUE)
xaringanExtra::use_logo(
  image_url = "img/logo-nhs-blue.png",
  exclude_class = c("title-slide", "inverse", "hide-logo")
)

r rmarkdown::metadata$title


r rmarkdown::metadata$subtitle

r rmarkdown::metadata$author

r rmarkdown::metadata$date


class: inverse, middle, center

An inverse slide

Often used for transitions


Bullets and text color

--

--

--

--


You can emphasize text with color:

--

And make it bold or italicized using Markdown:


Tables and quotes

Table

data("ae_attendances")
knitr::kable(head(ae_attendances), format = 'html')

Quote

This is what a quote looks like.


Line highlighting

An example of using the trailing comment #<< to highlight lines:

Code

`r ''````r
library(ggplot2)
ggplot(mtcars) + 
  aes(mpg, disp) + 
  geom_point() +   #<<
  geom_smooth()    #<<
```

Output

library(ggplot2)
ggplot(mtcars) + 
  aes(mpg, disp) + 
  geom_point() +   #<<
  geom_smooth()    #<<

A note about logos

NHS Organisation logo in title slide

The .title-slide class in nhsr.css looks for a title slide logo within an img folder located within the same directory as the xaringan .Rmd file.

NHS logo on every slide

The NHS logo can be incorporated on every slide using the use_logo() function in Garrick Aden-Buie's xaringanExtra package, or by following the guidance in his blog post xaringan Tip: Add A Logo to All of Your Slides.

For a more seamless logo experience, you can find this theme and high-resolution NHS logo files built into the NHSRtheme package developed by Tom Jemmett.

.footnote[The nhsr theme was designed by Silvia Canelon for, and with feedback from, the NHS-R Community, following the NHS identity guidelines.]



nhs-r-community/nhsrtheme documentation built on Dec. 7, 2024, 11:29 p.m.