Learn R Programming

as.color (version 0.1)

Assign Random Colors to Unique Items in a Vector

Description

The as.color function takes an R vector of any class as an input, and outputs a vector of unique hexadecimal color values that correspond to the unique input values. This is most handy when overlaying points and lines for data that correspond to different levels or factors. The function will also print the random seed used to generate the colors. If you like the color palette generated, you can save the seed and reuse those colors.

Copy Link

Version

Install

install.packages('as.color')

Monthly Downloads

1

Version

0.1

License

GPL (>= 2)

Maintainer

Silas Tittes

Last Published

June 20th, 2016

Functions in as.color (0.1)

as.color

Create a unique set of colors that matched the unique set of inputs from a single vector.