class: center, middle, inverse, title-slide # Lec 9: Authoring Markdown Documents ## SDS 192: Introduction to Data Science ###
Shiya Cao
Statistical & Data Sciences
, Smith College
###
Spring 2023
--- # Today's Learning Points * YAML * Code chunks * Headers * Images and hyperlinks * Styling --- # YAML .pull-left[ * Metadata provided at the top of a R Markdown file * Indicates how the file should be formatted * Surrounded by `---`s ] .pull-right[ ![](img./Lec9_yaml.png) ] --- # Code Chunks .pull-left[ * Executable chunks of code are surrounded by <code>```</code>s * We can insert R code as well as other languages * We can run all code chunks from start to finish, or individually * Ordering is important!] .pull-right[ ![](img./Lec9_chunks.png) ] --- # Code Chunks, cont. .pull-left[ * `include = FALSE` code runs; but code and output don't appear in the final document * `echo = FALSE` code runs and output appears in final document; but code doesn't appear in final document * `message = FALSE` hides messages from the code in final output * `warning = FALSE` hides warnings from the code in final output ] .pull-right[ > We don't always want to display our code in the final output. We don't even always want to display the output of our code in the final output. ] --- # Headers .pull-left[ ``` # Header 1 ## Header 2 ### Header 3 ... ###### Header 6 ``` ] .pull-right[ # Header 1 ## Header 2 ### Header 3 ... ###### Header 6 ] --- # Images and Hyperlinks .pull-left[ ``` ![](img/Lec9_chunks.png) [here](https://www.google.com) ``` ] .pull-right[ ![](img./Lec9_chunks.png) [here](https://www.google.com) ] --- # Styling .pull-left[ \*Check this out!\* \*\*Check this out!\*\* \~\~Check this out!\~\~ \_Check this out!\_ ] .pull-right[ *Check this out!* **Check this out!** ~~Check this out!~~ _Check this out!_ ]