R: Utility function to translate values into colors.

val2col {sccore} | R Documentation

## 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

    colors <- val2col( rnorm(10) )

[Package sccore version 1.0.1 Index]