formatp: Yet another p-value format function

View source: R/formatp.R

formatpR Documentation

Yet another p-value format function

Description

Formats p-values the way I like them

Usage

formatp(x, digits = 3, sig = 0.05, sig_marker = c("", ""))

Arguments

x

A p-value

digits

The number of digits to display of the p-value.

sig

The alpha or significance levels. Used for formating.

sig_marker

A length 2 character vector. The formating for p-values < sig. The first entry is placed before the p-value, the second entry is placed after the p-value. For example, <b>0.034</b>.

Examples

formatp(runif(1))
formatp(0.0001)
formatp(0.023, sig_marker = c(":) ", " * I'm addicted to p-values *"))
formatp(0.051, sig_marker = c(":) ", " * I'm addicted to p-values *"))

thomasgstewart/tgsify documentation built on Aug. 1, 2024, 4:55 p.m.