The shortcut to knit a document is Command + Shift + K
numbered lists:
combine numbered and unordered lists:
backticks for code.~). For
example, H~2~O renders as H2O.^), like
this: R^2^ renders as R2.Direct in-line links: https://rmarkdown.rstudio.com/.
Phrase links: RStudio’s R Markdown page.
R Markdown image
Command + Option + I
Before running code chunks it is often a good idea to restart your R session and start with a clean environment. Do this with Command + Shift + F10
To save time, it’s worth learning these shortcuts to run code:
The cars dataset contains 50 rows and 2 columns.
knitr::kable(head(cars), 
             caption = "The First Few Rows of the Cars Dataset")| speed | dist | 
|---|---|
| 4 | 2 | 
| 4 | 10 | 
| 7 | 4 | 
| 7 | 22 | 
| 8 | 16 | 
| 9 | 10 | 
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.