Module 2 | Lesson 4
Code chunk options
The true power of Quarto lies in its seamless integration of R computations directly into reports.
Let's explore the correct method for embedding R code within a Quarto report to leverage its full potential.
Members only
4 minutes readInsert code
The basic syntax to add a code chunk looks as follow:
```{r}
# Some R code here
1 + 1
```
→
This applies in "Source" mode. In "Visual" mode you can type /
and select R Code Chunk
Whenever Quarto sees this, it will run the R code and write the output below the chunk in the final .html
document.
Run code
Several options exist to run this code chunk:
Productive R Workflow
This lesson is for members only! 😔
Become a member now to access the full course with a lifetime access!
Or Login