formatP | R Documentation |
...
formatP(p, min.sig = 0.001, max.sig = 99.99, sig.digs = 3)
p |
A single number with p-values to be formatted. |
min.sig, max.sig |
Numbers in (0, 100) defining when function should return a thing like '<0.01%' or '>99.99%' instead of number. By default 0.001 and 99.99. |
sig.digs |
A number of significant digits to show. By default 3. |
TODO: Allow vectorized input TODO: Add a way to automatically format them in APA/NEJM formats TODO: Add a way to skip a trailing 0 and add p/P in the beginning TODO: Add option to sanitize input
A character vector with p-values formatted in a nice way
Other publishing-formatting:
formatOR()
,
signif_sym()
formatP(0.0026485635335) # -> "0.265%" formatP(5e-33) # -> "<0.001%"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.