CRAN

as.color 0.1

Assign Random Colors to Unique Items in a Vector

Released Jun 20, 2016 by Silas Tittes [aut, cre]

This package is available for Renjin and there are no known compatibility issues.

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.

Installation

Maven

This package can be included as a dependency from a Java or Scala project by including the following your project's pom.xml file. Read more about embedding Renjin in JVM-based projects.

<dependencies>
  <dependency>
    <groupId>org.renjin.cran</groupId>
    <artifactId>as.color</artifactId>
    <version>0.1-b9</version>
  </dependency>
</dependencies>
<repositories>
  <repository>
    <id>bedatadriven</id>
    <name>bedatadriven public repo</name>
    <url>https://nexus.bedatadriven.com/content/groups/public/</url>
  </repository>
</repositories>

View build log

Renjin CLI

If you're using Renjin from the command line, you load this library by invoking:

library('org.renjin.cran:as.color')

Test Results

This package was last tested against Renjin 0.8.2359 on May 26, 2017.

Source

R

View GitHub Mirror

Release History