pval2str: Convert a p-value to a character corresponding to p-value...

View source: R/pvals.R

pval2strR Documentation

Convert a p-value to a character corresponding to p-value levels

Description

Convert a p-value to a character corresponding to p-value levels

Usage

pval2str(pv, numonly = FALSE, ...)

pval2star(pv, ns = "", thresholds = c(0.05, 0.001, 1e-04))

Arguments

pv

a p-value

numonly

do not append stars to the output of pval2str

ns

string to be used for values below the lowest threshold

thresholds

numeric vector defining three thresholds for one, two or three stars

Details

Convert a p-value to a character corresponding to p-value levels. pval2str returns a formatted number with, optionally, stars denoting the significance of the p-value. pval2star returns just the stars.

Value

Both functions return character vector with p-values converted to respective strings.

Examples

# will return c( "**" )
pval2star( 0.0005 )

january3/myfuncs documentation built on Jan. 16, 2025, 8:37 p.m.