fmt_p_value_md | R Documentation |
Format a p-value in markdown
fmt_p_value_md(ps)
ps |
p-values to format |
fmt_p_value()
is for formatting p-values with manual precision, but this
functions follows some reasonable defaults and returns a markdown formatted
string.
Values less than .06 are formatted with 3 digits. Values equal to .06 or greater are formatted with 2 digits.
scales::label_pvalue()
does the initial rounding and formatting. Then this
function strips off the leading 0 of the p value.
a character vector of markdown formatted p-values
fmt_p_value_md(0.0912)
fmt_p_value_md(0.0512)
fmt_p_value_md(0.005)
# "p less than" notation kicks in below .001.
fmt_p_value_md(0.0005)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.