write_p | R Documentation |
write_p
formats a p-value for display in an RMarkdown document.
write_p(x, digits = 2)
x |
A length-1 numeric or a list-like object with element named |
digits |
Number of digits to round to (default to 2) |
If x < 10^(-digits), then the result is the string p < 10^(-digits) in decimal notation.
Returns a LaTeX-formatted string to report a p-value to the specified number of digits.
write_p(0.2345)
write_p(0.000234)
x = rnorm(10)
test1 = t.test(x)
write_p(test1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.