I'm trying to generate blank lines within a loop containing an H2 header and a table created by the gt package.
In the first example outside the loop we can see that "", the bar followed by two spaces produces the desired effect, but how to achieve this same effect in a loop?
---
title: "Report"
output:
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r, include=FALSE}
#bibliotecas usadas
library(tidyverse)
library(gt)
```
## Header 1
\
\
\
\
4 lines breaks above
\
\
```{r gt1, echo=FALSE}
head(mtcars) %>% gt()
```
\
\
```{r gtfor, echo = FALSE, warning=FALSE, message= FALSE, results='asis'}
for( i in 1:3)
{
cat("\n\n## some Header ##\n")
print("\n\n")
print("\ ")
print(
head(mtcars) %>% gt()
)
}