Code chunks allow you execute code and embed the results within your R Markdown document. A code chunk is created by typing the delimeters ```{r} and ``` and sandwiching your code in between. When specifying code chunk options, you can either:

While there are over 50 chunk options to help you customize the behavior of knitr when processing code chunks, we most commonly use the following options:



TIP: You can use the keyboard shortcuts, Ctrl + Alt + I (PC) or Cmd + Option + I (OS X), for quickly inserting code chunks.

RESOURCE: Check out knitr: Elegant, flexible, and fast dynamic report generation with R by Yihui Xie for an excellent overview of code chunk options.