bs_table | R Documentation |
Learn more at https://getbootstrap.com/docs/5.1/content/tables/.
bs_table( x, id, headers = NULL, table_attr = list(class = "table"), thead_attr = NULL, tbody_attr = NULL, tr_attr = NULL, th_attr = list(scope = "col"), td_attr = NULL, wrapper_attr = NULL )
x |
A data frame or list with entries of equal length. |
id, |
A string, the id for the table. |
headers |
A vector of names to use as table headers instead of the list names (or 1, 2, 3, etc. if list is not named). |
table_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::table. |
thead_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::thead. |
tbody_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::tbody. |
tr_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::tr. |
th_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::th. |
td_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::td. |
wrapper_attr |
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::div wrapping html5::table. |
A string of HTML.
bs_table( id = "t1", x = list( col1 = c(1, 2, 3, 4, 5), col2 = c("a", "b", "c", "d", "e"), col3 = c(1, 2, 3, 4, 5), col4 = c("test", "test", "test", "test", "test") ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.