powered by
write_p formats a p-value for display in an RMarkdown document.
write_p
write_p(x, digits = 2)
Returns a LaTeX-formatted string to report a p-value to the specified number of digits.
A length-1 numeric or a list-like object with element named p.value (such as an htest object)
p.value
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.
write_p(0.2345) write_p(0.000234) x = rnorm(10) test1 = t.test(x) write_p(test1)
Run the code above in your browser using DataLab