pStars | R Documentation |
Converts a p-value score in equivalent stars of significance.
pStars(p.value, one = 0.05, two = 0.01, three = 0.001, four = 1e-04)
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. |
It returns a string with the corresponding level of significance: NS
, *
, **
, ***
, ****
.
significance = pStars(0.002)
require(dplyr)
data.frame =
data.frame %>%
mutate(p.stars = sapply(data.frame$p.value.column, pStars))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.