Learn R Programming

switchSelection (version 2.0.0)

starsVector: Stars for p-values

Description

This function assigns stars (associated with different significance levels) to p-values.

Usage

starsVector(p_value)

Value

The function returns a string vector of stars assigned according to the rules described in 'Details' section.

Arguments

p_value

vector of values between 0 and 1 representing p-values.

Details

Three stars are assigned to p-values not greater than 0.01. Two stars are assigned to p-values greater than 0.01 and not greater than 0.05. One star is assigned to p-values greater than 0.05 and not greater than 0.1.

Examples

Run this code
p_value <- c(0.002, 0.2, 0.03, 0.08)
starsVector(p_value)

Run the code above in your browser using DataLab