You can find shortcuts in the dropdown menu “Help” -> “Keyboard Shortcuts Help”, or online
I want to draw your attention to these shortcuts, in particular, as they are use quite often:
| Description | Windows | Mac |
|---|---|---|
| Keyboard help | Alt+Shift+k |
option+Shift+k |
Insert assignment operator <- |
Alt+- |
option+- |
Insert pipe operator %>% |
Ctrl+Shift+m |
Cmd+Shift+m |
| Insert multiple cursors | Ctrl+Alt+ L Mouse |
Ctrl+option+ L Mouse |
Insert code chunk {r} |
Ctrl+Alt+ i |
Ctrl+option+ i |
Comment out lines # |
Ctrl+Shift+c |
Cmd+Shift+c |
| Search active document | Ctrl+f |
Cmd+f |
RMarkdown documents begin with a yaml header which passes arguments to pandoc (the program that creates the document). The options that can be specified in the yaml header are document-specific. Some arguments that exist for all types of documents include title, author, date, and output.
You can see a cheatsheet for RMarkdown under “Help” -> “Cheetsheets” -> “R Markdown Cheetsheet”.
Some useful things to know:
Prefacing something with a \ means “do not evaluate”
Adding a break between lines starts a new paragraph
code formatsStarting text with a > creates a…
…block quote paragraph that can span multiple lines
Enclosing text with double ~~ creates a strikethrough
Code in RMarkdown is wrapped in three backticks ` followed at the beginning by {r}
```{r}
Code would go here.
```
Copyright © Penn State Psychology. All rights reserved.