Learn R Programming

fitteR (version 0.2.0)

pvalue2stars: Significance stars

Description

Get stars indicating the magnitude of significance of a P-value.

Usage

pvalue2stars(x, ns = "")

pvalues2stars(x, ns = "")

Arguments

x

Numeric value or numeric vector, typically a P-value from a statistical test.

ns

A character string specifying how insignificant results should be marked. Empty string by default.

Value

String(s) of stars or points.

Details

While the function pvalue2stars accepts only a single value, the function pvalues2stars is a wrapper calling pvalue2stars for a vector. The range of x is not checked. However, a check is done, if x is numeric at all.

Examples

Run this code
# NOT RUN {
x <- runif(1, 0,1)
pvalue2stars(x)

x <- 0.5
pvalue2stars(x, ns="not signif")

x <- c(0.0023, 0.5, 0.04)
pvalues2stars(x, ns="not signif")

# }

Run the code above in your browser using DataLab