Is it possible to have sortable (Interactive) table in rMarkdown?
问题 I am using kable() from knitr package to show a table on a html document. Is it possible to make it sortable? Some sample code, --- title: "Test" output: html_document --- ```{r, echo=FALSE, comment=""} kable(data.frame("a"=1:10,"b"=11:20),digits=2) ``` 回答1: The package DT (https://github.com/rstudio/DT) is an R interface to the JavaScript library DataTables. You can use it in R Markdown, e.g. ```{r} DT::datatable(iris) ``` 来源: https://stackoverflow.com/questions/27120002/is-it-possible-to