powered by
Rank a numeric vector using proportional table and returns character vector of names of color using palette
rank2colors(x, palette = "Blues", reverse = TRUE, color = "red")
A numeric vector
Name of the color palette
Logical. Whether or not reverse the order of the color palette
Default color when palette is NULL
rank2colors(mtcars$wt,palette="Blues")
Run the code above in your browser using DataLab