How to add space between ouputs of the same chunk in R?

Viewed 628

I have the following code in R

{r echo=F }

listA <- list(knitr::kable(mtcars[1:4,1:4]),knitr::kable(mtcars[1:4,1:4]),knitr::kable(mtcars[1:4,1:4]))

listA[[1]]
listA[[2]]
listA[[3]]

¿How can I increase the blank space between the three resulting tables without putting them in different chunks and considering that they are supposed to be part of an html document using bookdown and prettydoc?

1 Answers

For normal RMarkdown docs this workaround is ok:

{r echo=F, results='asis'}

listA <- list(knitr::kable(mtcars[1:4,1:4]),knitr::kable(mtcars[1:4,1:4]),knitr::kable(mtcars[1:4,1:4]))


listA[[1]]
cat("\n")
cat("#####\n")
cat("\n")
listA[[2]]  
listA[[3]]

For anything more complicated, like using bookdown + prettydocs, this solution won't work.

Related