formatp: Yet another p-value format function

Description Usage Arguments Examples

View source: R/formatp.R

Description

Formats p-values the way I like them

Usage

1
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

1
2
3
4
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 June 18, 2020, 11:10 a.m.