-
Notifications
You must be signed in to change notification settings - Fork 5
Add govuk_DT() features #63
Comments
Source code for the experiment: https://github.com/co-analysis/people-survey-explorer/blob/master/orgscores.Rmd |
THOUGHT: There should be a single user facing function Should this function:
(1) gives full control over the rendering and styling of the table, also allows the function to generate filtering controls, likely limits extent of using advanced (2) gives greater controls over the design and structure of the table, but potential to cause design conflicts/javascript errors if the table includes unexpected elements. |
Can |
With Details here, with some very shocking formatting decisions. From experience you can apply iris2 <- iris %>% mutate_at(Sepal.Length, formattable::percent, digits = 1) And then supply this to your DT call, and it'll still show up as a percentage DT::datatable(iris2) |
I think a pipeable formatter would be the best approach. iris %>%
mutate(x = scales::percent(x)) %>%
DT::datatable() %>%
govdown::govdownify() %>%
more_formatting() # User takes responsibility for conflicts with govdown from here on As a rule I'm not in favour of using DT or similar to change the values in a table. I think that should be up to |
Have recently experimented with applying gov.uk style guidelines to interactive
{DT}
tables in{govdown}
. This is an issue to discuss development ahead of a future PR.The text was updated successfully, but these errors were encountered: