library("DT")
The DT
package provides an R interface to the excellent DataTables JavaScript
library. R objects, such as matrices or data frames, can be displayed as interactive
tables on HTML pages. The DT
provides filtering, pagination, sorting, and many other features in the
tables.
Install using
install.packages("DT")
You generate an interactive table on any data frame using the datatable
function
data(iris, package = "datasets") datatable(iris)
rm(list = ls())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.