num2col: Transforms numbers to colours

View source: R/general.purpuse.utilities.R

num2colR Documentation

Transforms numbers to colours

Description

Wrapper function for colorRamp. Transforms numbers to the gradient specified by col parameter

Usage

num2col(
  d,
  col = c("blue", "cyan", "gray", "orange", "red"),
  minx = min(d, na.rm = TRUE),
  maxx = max(d, na.rm = TRUE)
)

Arguments

d

numbers to be transformed

col

colours to form gradient (blue-red by default)

minx, maxx

range of x values (min(x),max(x) by default)

Value

vector of colours (same length as d)


iaaka/visutils documentation built on Jan. 17, 2025, 11:29 p.m.