pvalcol: Associate colors to _p_-values

View source: R/util.R

pvalcolR Documentation

Associate colors to p-values

Description

Associate colors to p-values according to their value.

Usage

pvalcol(pvals, col, pvlims = c(0.05, 0.01))

Arguments

pvals

Vector of p-values to which associate colors.

col

Colors Vector of colors to associate with the p-values given in pvals according to the limits specified in pvlims.

pvlims

Vector of p-value upper limits, first value should be 1.

Value

A vector of colors associated with p-values given in pvals.

Examples

micompr:::pvalcol(c(0.06, 0.9, 0.0001, 0.3, 0.2, 0.02),
                  c("darkgreen", "yellow", "red"))
# [1] "darkgreen" "darkgreen" "red"       "darkgreen" "darkgreen" "yellow"


FakenMC/micompr documentation built on Jan. 31, 2024, 5:09 a.m.