Rmarkdown and DT: result do not render

人盡茶涼 提交于 2019-12-14 02:05:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!