README.md

bReakingbad

Travis build status Coverage Status

The goal of bReakingbad is to nicely format p-values based on a threshold to sciencific notation in a markdown table.

Installation

You can install the released version of bReakingbad from github with:

devtools::install_github("murraycadzow/bReakingbad")

Example

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(.)


murraycadzow/bReakingbad documentation built on Oct. 15, 2021, 3:27 p.m.