5
私は問題https://github.com/rstudio/rmarkdown/issues/967を報告しましたが、これに対して回避策(この作業を行う方法)がありますか? Iは、Rmarkdownオーバーラップ出力
あなたの例では、生成HTMLを見て---
title: "Test links to sections in DT"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE)
knitr::opts_chunk$set(message=FALSE)
knitr::opts_chunk$set(warning=FALSE)
## DT Test
```{r echo=FALSE}
library(DT)
n <- 1000
nGroup <- 100
testDF <- data.frame(text=paste0("Section", 1:n),
number=1:n,
group=rep(1:(n/nGroup), n/nGroup))
datatable(head(testDF), caption="Whole table", rownames=FALSE, escape=FALSE, options=list(paging=FALSE, info=FALSE))
getDT<-function(x) {
a <- list()
a[[1]] <- htmltools::tags$h3("test1")
a[[2]] <- datatable(x[, c("text", "number")], caption=htmltools::tags$caption(style="caption-side: top; text-align: left;", "Group: ", htmltools::strong(x$group)), rownames=FALSE, escape=FALSE, filter=c("none"), options=list(paging=FALSE, info=FALSE))
a[[3]] <- htmltools::tags$h4("test1")
return(a)
}
res <- lapply(split(testDF, testDF$group), getDT)
htmltools::tagList(res)
```