Learn R Programming

micompr (version 1.1.4)

pvalcol: 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))

Value

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

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.

Examples

Run this code
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"

Run the code above in your browser using DataLab