Using knitr in RStudio, pander does not produce any (or correct) html output when in a for loop. Here is a minimal case, as an Rmd input file.
---
title: \"Unt
@daroczig answered in the comments :
results
to asis
, either at the global level knitr::opts_chunk$set(results="asis")
or at the chunk level ```{r,results="asis"}
panderOption
knitr.auto.asis
: panderOptions('knitr.auto.asis', FALSE)
Cf. this issue
---
title: "Untitled"
output: html_document
---
Testing **when** pander doesn't work in for loop
```{r global_options, include=FALSE}
knitr::opts_chunk$set(fig.width=7, fig.height=5, echo=TRUE, warning=FALSE,
message=FALSE)
```
```{r,results="asis"}
library(pander)
panderOptions('knitr.auto.asis', FALSE)
r <- 1:10
for (i in 1:2) pander(summary(r))
```