```{r setup, include=FALSE} if (!require("tidyverse")) { install.packages("tidyverse") library(tidyverse) } if (!require("knitr")) { install.packages("knitr") library(knitr) } if (!require("gifski")) { install.packages("gifski") library(gifski) } if (!require("plotly")) { install.packages("plotly") library(plotly) } # knitr::opts_knit$set(root.dir = "C:\\STA490\\w05") knitr::opts_chunk$set(echo = TRUE, warning = FALSE, result = TRUE, message = FALSE, comment = NA) ``` \ # More Controls with YAML One can add some additional controls of the knitted document to the YAML header. * `code_folding: "hide"` to hide the code chunk to make the knitted document cleaner. * `code_download: true` to allow downloading RMD source from the HTML page. There a lot more controls defined in the default template of the RMD document. We can run the following command in the R Console
`system.file("rmd/h/default.html", package = "rmarkdown")`
to find the location of the default template file. To modify the default template, we can open it in any text editor and then save it as `.html` file. # HTML Tags for YAML In general, the YAML header lays out the title of the knitted document. It can be decorated using CSS. The content in YAML that passes to the knitted document is enclosed in double quotes. One could also use HTML tags directly to add new features to the title. When doing this, you need to change the default double quotes to single quotes. For example, `'Some R Markdown Tips'` changes the color from `navy` to `purple`. # Commonly Used HTML Tags Most frequently used HTML tags * ` ` - font decoration * ` ` - hyperlink * `` - including an image * `
` -
alignment
* `
` - line break * `hr` - horizontal line * `
...
` - divide * `

` - paragraph * `` - unordered list * `
` - ordered list * `
  • ` - list (`
  • `) is used with either `
      ` or `