to_lessthan | R Documentation |
This function is best used for transforming numeric pvalue columns into character representation based on desired number of sig figs. Defaults to replacing numeric vectors below 0.01 with '<0.01'
to_lessthan(x, digits = 2)
x |
Numeric vector |
digits |
desired number of digits to round to |
character vector with values below rounding limit coerced to '< x'
data(mtcars)
Remove Toyota corona (row 21) to get larger smaller pvalue for illustration
mod = glm(am ~ hp + wt ,
data = mtcars[-21,], family = binomial())
tab = glm_ORs(mod)
tab$p_1d = to_lessthan(tab$p, digits = 1)
tab$p_2d = to_lessthan(tab$p, digits = 2)
tab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.