How to: Customize the YAML Header

How to: Format Plain Text

italicize a word/phrase italic this phrase is in italics

bold a word hey I’m bold and awesome bold

inline code chunks with backticks package_name # this appears in monospaced font

superscript and subscript superscript2 subscript2 # How to: Format Headers

The number of # signs dictate how large the heading is.

This is a subheading

Let’s review the TOC options!

How to: Lists

markdown need an Empty line before a list numbered lists (don’t forget the space after the dot)

  1. One
  2. Two
  3. Three

bulleted list with sub points (two spaces in front for sub points) can use *, -, or + symbol for bullet points

can mix types

  1. It’s a
  1. mixed list

How to: Formulas

create inline formula \(\forall x \in X, \quad \exists y \leq \epsilon\) It looks good.

create displayed formula \[\cos (2\theta) = \cos^2 \theta - \sin^2 \theta\] It looks good.

How to: What is a Code Chunk?

code chunk example What will this code chunk do?

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

How to: Code Chunk Names

code chunk example What will this code chunk do?

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

How to: Code Chunk Options

code chunk example with option What will this code chunk option do?

##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Try the following options

1. echo=FALSE hides the code but displays results 2. results=‘hide’ hides the results but shows the code 3. eval=FALSE displays the code but does not evaluate it 4. include=FALSE evaluates the code but does not display code or output 5. warning=FALSE and message=FALSE are useful for suppressing any messages produced when loading packages

How to: Format Data Tables

code chunk example What will this code chunk do?

Example caption for the iris data frame
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa