---
title: Collapse source code and text output
---

By default, the source and output are in separate blocks:

```{r}
x = 1 + 1
x
x + 2
```

Set `collapse = TRUE` to collapse them:

```{r, collapse = TRUE}
x = 1 + 1
x
x + 100
```
