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) ```
Upon installing, inserttable registers a new RStudio Addin (Insert Table) that can be used to easily insert a table in a Rmd document. To use it, open a Rmd or R document and select “Addins –> Insert Table”.
knitr is an engine for dynamic report generation with R. It is a package in the programming language R that enables integration of R code into LaTeX, LyX, HTML, Markdown, AsciiDoc, and reStructuredText documents. The purpose of knitr is to allow reproducible research in R through the means of literate programming.
rmarkdown provides an environment where you can write your complete analysis, and marries your text, and code together into a rich document. You write your code as code chunks, put your text around that, and then hey presto, you have a document you can reproduce.
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) ```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With