roundDT | R Documentation |
This is a convenience function around [DT::formatRound()] that identifies all of the numeric columns and rounds them, as opposed to just rounding prespecified columns.
roundDT(x, digits = 3)
x |
a DT::datatable |
digits |
the number of digits to round. If |
a rounded DT::datatable
df <- data.frame(a=rnorm(10), b=sample(letters, 10), c=rnorm(10))
roundDT(DT::datatable(df), digits=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.