Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

colors <- val2col( rnorm(10) )

sccore

Core Utilities for Single-Cell RNA-Seq

v0.1.3
GPL-3
Authors
Viktor Petukhov [aut], Ramus Rydbirk [aut], Peter Kharchenko [aut], Evan Biederstedt [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.