DataTableWithRItemFormat | R Documentation |
DataTableWithRItemFormat
Create an HTML widget DataTable which looks like Q's blue table style. Facilitates nicer printing of wrapping text and coefficient matrices.
DataTableWithRItemFormat(
dd,
caption = NULL,
header.alignments = NULL,
allow.length.change = TRUE,
length.menu = c(10, 15, 20),
page.length = min(15, nrow(dd)),
allow.paging = TRUE,
show.info = TRUE,
escape.html = TRUE
)
dd |
The |
caption |
Text to be placed beneath the table. |
header.alignments |
A character vector with one element for each column in
|
allow.length.change |
Boolean value that determines whether or not the user is given a menu allowing them to choose the height of the table. |
length.menu |
A vector of integers specifying the options to show in the menu of table heights. |
page.length |
An integer specifying the initial height of the table. |
allow.paging |
A boolean value to specify whether pagination is turned on. |
show.info |
A boolean value to specify whether or not extra info is shown below the table, including pagination info like "Showing 5 of 10 items". |
escape.html |
Either a boolean value or a vector of integers which determines how to escape html characters in the table. If TRUE, then all columns are escaped, and so no html code will be executed. If FALSE, then no columns will be escaped. A vector of positive integers allows you to specify the columns to be escaped. A vector of negative integers allows you to specify which columns not to escape. |
my.df <- data.frame(First = c(1,2,3), Second = c("a", "b", "c"))
my.dt <- DataTableWithRItemFormat(my.df, caption = "A nice table")
my.dt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.