Quantcast
Viewing all articles
Browse latest Browse all 106

How to create paged tables in a loop in R rmarkdown?

Below I'm trying show a paged_table below each plot in my loop.

But the tables don't show up at all. I was wondering if there is a way to achieve this in Rmarkdown?

(I'm open to using any other packages.)

---title: How to loop paged tables in Rmarkdown?output:  html_document:    df_print: paged---   ```{r, echo=FALSE}library(knitr)library(rmarkdown)    ```
 ```{r,echo=FALSE, results='asis', rows.print=2}lapply(unique(cars$speed), \(i){cat(paste0("\n\n## ", i, "\n")) ## Writes new sectionsDat <- subset(cars, speed == i)paged_table(Dat)  ## These paged tables don't show!})    ```

Viewing all articles
Browse latest Browse all 106

Trending Articles