Learn R Programming

predict3d (version 0.1.5)

rank2colors: Rank a numeric vector using proportional table and returns character vector of names of color using palette

Description

Rank a numeric vector using proportional table and returns character vector of names of color using palette

Usage

rank2colors(x, palette = "Blues", reverse = TRUE, color = "red")

Arguments

x

A numeric vector

palette

Name of the color palette

reverse

Logical. Whether or not reverse the order of the color palette

color

Default color when palette is NULL

Examples

Run this code
rank2colors(mtcars$wt,palette="Blues")

Run the code above in your browser using DataLab