print_pval: A helper function to round p-values and paste less than or...

View source: R/print_pval.R

print_pvalR Documentation

Description

This function takes a numeric value and rounds it, then it formats it in order to be reported in an academic report written in LaTeX or markdown. It is most useful for R output that is more than three decimal places long.

Usage

print_pval(x, latex = TRUE)

Arguments

x

(numeric) A p-value to round

latex

(Logical) If true, output is appropriate for LaTeX. Otherwise formatting is for markdown.

Examples

print_pval(0.03765)
print_pval(0.0000001, latex = FALSE)

jvcasillas/academicWriteR documentation built on Dec. 28, 2024, 5:09 p.m.