RStudios GUI – the text editor
Hints for the RStudio text editor
1 Hints for working in the text editor
1.1 Working in Quarto markdown documents
When working in a quarto document, the text should be divided into one (and only one) YAML at the beginning of the document. The YAML is delimited by two lines consisting of ---
.
Below the YAML, the text will consist of markdown, with any number of inserted R chunks. Notice, the difference in background colour (which is contingent upon the chosen Editor Theme in Tools / Global Options / Appearance).
Each R chunk is delimited by lines of ```{r}
and ```
.
Notice the inline r-code in line 15 (orange box), which is delimited by `r
and `
.
1.2 Visual versus Source code
Try out the buttons Visual
and Source
in the top left hand corner. Also note the YAML line editor
(line 4), which sets the default choice for visual versus source editor.
1.3 Document outline
Notice the icon Outline
in the top right hand corner, which shows/hides a hierachial outline of the documents headings.
1.4 Code outline
Also notice the icon in the bottom left hand corner (purple box) – in the illustration above it is entitled ‘Subheading’, but this dynamically changes contingent upon where the cursor is located.