piformat: Pretty-printer for p-values

View source: R/piformat.R

piformatR Documentation

Pretty-printer for p-values

Description

This function formats p-values in the most usual way, i.e. with two decimals if p>=0.05, with three decimals if p>=0.001 and p<0.05, and as "p<0.001" if p<0.001.

Usage

piformat(x, html = FALSE, tb = TRUE)

Arguments

x

One or more color names (as a character vector)

html

Escape the < character with the &lt; character entity

tb

Omit the "p=" or "p<" part, e.g. if outputting to a table

Value

A character vector of equal length to x, with formatted p-values

Examples

piformat(c(0.0001,0.001,0.01,0.1,0.5))


thlytras/Rivets documentation built on April 16, 2024, 5:43 a.m.