sccore (version 0.1.2)

val2col: Utility function to translate values into colors.

Description

Utility function to translate values into colors.

Usage

val2col(x, gradientPalette = NULL, zlim = NULL, gradient.range.quantile = 0.95)

Arguments

x

input values

gradientPalette

gradient palette (default=NULL). If NULL, use colorRampPalette(c('gray90','red'), space = "Lab")(1024) if the values are non-negative; otherwise colorRampPalette(c("blue", "grey90", "red"), space = "Lab")(1024) is used

zlim

a two-value vector specifying limits of the values that should correspond to the extremes of the color gradient

gradient.range.quantile

extreme quantiles of values that should be trimmed prior to color mapping (default=0.95)

Examples

Run this code
# NOT RUN {
colors <- val2col( rnorm(10) )

# }

Run the code above in your browser using DataCamp Workspace