Hi, does anyone know how to remove the pagebreak between heading and first graph of RMarkdown 'asis' output.
In an rmd file.
---
title: test
output:
word_document
---
```{r, mtcars-plots, echo=FALSE, results='asis', fig.width=8, fig.height=9}
for (i in names(mtcars)) {
cat('\n\n# Summary of the variable `', i, '`\n\n')
x <- mtcars[, i]
hist(x, xlab = i, main = '')
plot(table(x), xlab = i, ylab = 'Frequency', lwd = 10)
}
For example, the output of the code above is:
How would you remove the white space?