Rmarkdown
YAML

Any questions?

Rmarkdown header is called 'YAML'

url <- "https://github.com/matthewhirschey/tidybiology-plusds/raw/master/media/Rmarkdown-yaml.png"
knitr::include_graphics(url)

Rmarkdown output is defined here

url <- "https://github.com/matthewhirschey/tidybiology-plusds/raw/master/media/Rmarkdown-output.png"
knitr::include_graphics(url)

Rmarkdown formats

Recall that Rmarkdown documents can be rendered into several different output file types

Rmarkdown Parameters

Parameters of a document are defined in the YAML header, and can pre-populate an Rmarkdown document. To see this in action,

  1. Open 11_rmarkdown_params.Rmd.
  2. Click the dropdown menu next to Knit and use Knit with Parameters to render the document.
  3. What happens if you type in a different gender or different age?

url <- "https://github.com/matthewhirschey/tidybiology-plusds/raw/master/media/Rmarkdown-parameters.png"
knitr::include_graphics(url)

url <- "https://github.com/matthewhirschey/tidybiology-plusds/raw/master/media/Rmarkdown-using-parameters.png"
knitr::include_graphics(url)

Take another look

Re-inspect 11_rmarkdown_params.Rmd.



Where were the parameters called in the code?



matthewhirschey/bespokelearnr documentation built on Oct. 11, 2020, 12:57 a.m.