pStars: P-value significance stars definer.

View source: R/pStars.R

pStarsR Documentation

P-value significance stars definer.

Description

Converts a p-value score in equivalent stars of significance.

Usage

pStars(p.value, one = 0.05, two = 0.01, three = 0.001, four = 1e-04)

Arguments

p.value

A single numeric value indicating the p-value to evaluate.

one

A numeric value to define the p-value threshold for the first level of significance (*). By default 0.05.

two

A numeric value to define the p-value threshold for the second level of significance (**). By default 0.01.

three

A numeric value to define the p-value threshold for the third level of significance (***). By default 0.001.

four

A numeric value to define the p-value threshold for the fourth level of significance (****). By default 0.0001.

Value

It returns a string with the corresponding level of significance: NS, *, **, ***, ****.

Examples

significance = pStars(0.002)

require(dplyr)
data.frame =
   data.frame %>%
   mutate(p.stars = sapply(data.frame$p.value.column, pStars))


sebastian-gregoricchio/Rseb documentation built on May 15, 2024, 5:45 a.m.