79382313

Date: 2025-01-23 19:21:34
Score: 0.5
Natty:
Report link

Very similar solution to this question - the same method appears to work well with ggplots. Use the multicol section tags build into officedown, as documented here. See the top and the bottom of the code block below.

<!---BLOCK_MULTICOL_START--->

```{r}
#| echo = FALSE,
#| fig.cap = "Plot 1",
#| fig.width = 2,
#| fig.height = 2

library(ggplot2)

ggplot(tibble::tibble(x = 1:10, y = 1:10), aes(x = x, y = y)) +
  geom_line()
```
```{r}
#| echo = FALSE,
#| fig.cap = "Plot 2",
#| fig.width = 2,
#| fig.height = 2

library(ggplot2)

ggplot(tibble::tibble(x = 10:1, y = 10:1), aes(x = x, y = y)) +
  geom_line()
```

<!---BLOCK_MULTICOL_STOP{widths: [3,3], space: 0.2, sep: false}--->

Results in:

Example of output

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Quinton.Quagliano