exp_p: Format P-Value for Scientific Notation

View source: R/utils_math.R

exp_pR Documentation

Format P-Value for Scientific Notation

Description

Format p-values in scientific notation for plot annotations.

Usage

exp_p(p, sci_thresh = 4)

Arguments

p

Numeric p-value

sci_thresh

Numeric threshold for using scientific notation (number of decimal places)

Details

This function formats p-values in scientific notation using the format "p = a × 10^b" which is suitable for ggplot2 annotations and maintains proper mathematical formatting.

Value

Expression object for use in plot annotations

Examples

# Format p-value for plotting
expr <- exp_p(0.001)


myTAI documentation built on Nov. 20, 2026, 5:08 p.m.