inst/doc/datatables.R

## ----cool, results='asis'-----------------------------------------------------
library(knitr)
kable(mtcars, 'html', table.attr='id="mtcars_table"')

## -----------------------------------------------------------------------------
options(markdown.html.header = system.file('misc', 'datatables.html', package = 'knitr'))

## ----boring, results='asis'---------------------------------------------------
kable(head(mtcars), 'html')

Try the knitr package in your browser

Any scripts or data that you put into this service are public.

knitr documentation built on Nov. 2, 2023, 5:49 p.m.