Check out example codes for "R p value star". It will help you in understanding the concepts better.

Code Example 1

library(gtools)
pvalue = 0.0004
stars.pval(pvalue)

#Output:
# [1] "***"
# attr(,"legend")
# [1] "0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"

Learn ReactJs, React Native from akashmittal.com