options(htmltools.dir.version = FALSE)
knitr::opts_chunk$set(
  fig.width=9, fig.height=3.5, fig.retina=3,
  out.width = "100%",
  cache = FALSE,
  echo = TRUE,
  message = FALSE, 
  warning = FALSE,
  hiline = TRUE
)
library(xaringanthemer)
style_duo_accent(
  primary_color = "#1381B0",
  secondary_color = "#FF961C",
  inverse_header_color = "#FFFFFF"
)

Typography

Text can be bold, italic, ~~strikethrough~~, or inline code.

Link to another slide.

Lorem Ipsum

Dolor imperdiet nostra sapien scelerisque praesent curae metus facilisis dignissim tortor. Lacinia neque mollis nascetur neque urna velit bibendum. Himenaeos suspendisse leo varius mus risus sagittis aliquet venenatis duis nec.


name: colors

Colors

.left-column[ Text color

Link Color

Bold Color

Italic Color

Inline Code ]

.right-column[ Lorem ipsum dolor sit amet, consectetur adipiscing elit (link), sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Erat nam at lectus urna. Pellentesque elit ullamcorper dignissim cras tincidunt (bold) lobortis feugiat. Eros donec ac odio tempor orci dapibus ultrices. Id porta nibh venenatis cras sed felis eget velit aliquet. Aliquam id diam maecenas ultricies mi. Enim sit amet code_color("inline") venenatis urna cursus eget nunc scelerisque viverra. ]


Big Topic or Inverse Slides #

Slide Headings ##

Sub-slide Headings ###

Bold Call-Out ####

This is a normal paragraph text. Only use header levels 1-4.

Possible, but not recommended #####
Definitely don't use h6 ######

Left-Column Headings

.left-column[

First

Second

Third

]

.right-column[ Dolor quis aptent mus a dictum ultricies egestas.

Amet egestas neque tempor fermentum proin massa!

Dolor elementum fermentum pharetra lectus arcu pulvinar. ]


class: inverse center middle

Topic Changing Interstitial

--

class: inverse center middle

layout: true

Blocks


Blockquote

This is a blockquote following a header.

When something is important enough, you do it even if the odds are not in your favor.


Code Blocks

R Code

ggplot(gapminder) +
  aes(x = gdpPercap, y = lifeExp, size = pop, color = country) +
  geom_point() +
  facet_wrap(~year)

JavaScript

var fun = function lang(l) {
  dateformat.i18n = require('./lang/' + l)
  return true;
}

More R Code

dplyr::starwars %>% dplyr::slice_sample(n = 4)

cli::cli_alert_success("It worked!")

--

message("Just a friendly message")

--

warning("This could be bad...")

--

stop("I hope you're sitting down for this")

layout: true

Tables


exclude: r if (requireNamespace("tibble", quietly=TRUE)) "false" else "true"

tibble::as_tibble(mtcars)

knitr::kable(head(mtcars), format = 'html')

exclude: r if (requireNamespace("DT", quietly=TRUE)) "false" else "true"

DT::datatable(head(mtcars), fillContainer = FALSE, options = list(pageLength = 4))

layout: true

Lists


.pull-left[

Here is an unordered list:

.pull-right[

And an ordered list:

  1. Item one
  2. Item two
  3. Item three
  4. Item four ]

And a nested list:


Nesting an ol in ul in an ol


layout: true

Plots


library(ggplot2)
(g <- ggplot(mpg) + aes(hwy, cty, color = class) + geom_point())

g + xaringanthemer::theme_xaringan(text_font_size = 16, title_font_size = 18) +
  ggtitle("A Plot About Cars")

.footnote[Requires {showtext}]


layout: false

Square image

GithHub Octocat

.footnote[GitHub Octocat]


Wide image

A wide image with a diagram of branching in git.

.footnote[Wide images scale to 100% slide width]


Two images

.pull-left[ A GitHub Octocat, style "mother hubber" ]

.pull-right[ A GitHub Octocat, style "dinotcat" ]


Definition lists can be used with HTML syntax.

Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green

class: center, middle

Thanks!

Slides created via the R packages:

xaringan
gadenbuie/xaringanthemer

The chakra comes from remark.js, knitr, and R Markdown.



gadenbuie/xaringanthemer documentation built on Aug. 26, 2022, 12:14 p.m.