Description Usage Arguments Details Examples
dt_styler( ) generates a datatable with style formatting that will "color" the rows that belong to the two key variables by coloring them according to the two colors assigned to the two key variable. dt_styler ( ) can be used for any two variables from a dataset and with any two colors from a dataset.
Learn more in vignette ("covid19BFI")
1 |
data |
A data frame that contains the data to be output in the datatable. |
id |
The column name that contains the key variables and will be used as an index for the function to identify. |
key1 |
A single argument that is the first key variable that is chosen to have each of its rows highlighted by being colored in the chosen color. |
key2 |
A single argument that is the second key variable that is chosen to have each of its rows highlighted by being colored in the other chosen color. |
clr1 |
The first color that will highlight all the rows that are associated with key1. |
clr2 |
The *second color that will highlight all the rows that are associated with key1. |
plength |
The argument the specifies the number of rows to be displayed in the table on the first page. Can take up to any number between 1 and the maximum length of the dataset. |
rownames |
Will create the first column as an index with the row numbers for each row when set to TRUE, rownames will not be shown when set to FALSE. |
The drop down page length selection is fixed at 7, 10, 15 and 20.
a datatable with colored rows according to the two chosen key variables.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.