The goal of bReakingbad is to nicely format p-values based on a threshold to sciencific notation in a markdown table.
You can install the released version of bReakingbad from github with:
devtools::install_github("murraycadzow/bReakingbad")
An example of conditional formatting for P values in a table:
library(bReakingbad)
pvalues <- data.frame(x = seq(0.001, 0.0001, length.out = 15) ,
y = seq(0.1, 0.0001, length.out = 15))
pvalues %>%
mutate(x_form = purrr::map_chr(x, ~ format_p_ke(.x)),
y_form = purrr::map_chr(y, ~ifelse(.x < 0.05,
format_p_ke(.x, bold = TRUE, format = 'html'),
format_p_ke(.x, bold = FALSE, format = 'html')) )
) %>%
select(contains('x'), contains('y')) %>%
knitr::kable(.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.