问题
Do you know how to render this in Rmarkdown?
```{r, results='asis'}
library(DT)
obj <- data.frame(B=as.numeric(1:18),
C=as.factor(c("A","B","C")),
stringsAsFactors=FALSE)
obj <- split(obj, obj$C, drop = TRUE)
lapply(obj, function(x) {
datatable(x,
filter = 'top', options = list(
pageLength = 12, autoWidth = TRUE))
}
)
```
DT tables render in the Viewer of RStudio but cannot have the splitted tables in the .Rmd.. what am I missing?
来源:https://stackoverflow.com/questions/33343241/rmarkdown-and-dt-result-do-not-render