Learn R Programming

parameters (version 0.1.0)

format_p: p-values formatting

Description

Format p-values.

Usage

format_p(p, stars = FALSE, stars_only = FALSE, name = "p")

Arguments

p

value or vector of p-values.

stars

Add significance stars (e.g., p < .001***).

stars_only

Return only significance stars.

name

Name prefixing the text. Can be NULL.

Value

A formatted string.

Examples

Run this code
# NOT RUN {
format_p(c(.02, .065, 0, .23))
format_p(c(.02, .065, 0, .23), name = NULL)
format_p(c(.02, .065, 0, .23), stars_only = TRUE)
# }

Run the code above in your browser using DataLab