Bold or unbold p-values for fmt_table1 objects in Rmarkdown

# S3 method for fmt_table1
bold_p(x, t = 0.05, q = FALSE, ...)

Arguments

x

fmt_table1 object

t

Determines the threshold below which p-values get bolded. Default is 0.05.

q

logical argument. When TRUE will bold or unbold the q-value column rather than the p-values

...

further arguments passed to or from other methods

Examples

trial %>% fmt_table1(by = "trt") %>% add_comparison() %>% bold_p()
#> #> Variable Drug Placebo p-value #> N = 107 N = 93 #> Age, yrs 47 (39, 58) 46 (36, 54) 0.3 #> Unknown 3 5 #> Marker Level, ng/mL 0.61 (0.22, 1.20) 0.72 (0.22, 1.63) 0.4 #> Unknown 4 4 #> T Stage 0.13 #> T1 25 (23%) 26 (28%) #> T2 26 (24%) 23 (25%) #> T3 29 (27%) 13 (14%) #> T4 27 (25%) 31 (33%) #> Grade 0.3 #> I 38 (36%) 29 (31%) #> II 34 (32%) 24 (26%) #> III 35 (33%) 40 (43%) #> Tumor Response 52 (51%) 30 (33%) __0.017__ #> Unknown 6 3