Learn R Programming

Chameleon

Overview

chameleon contains a set of functions for automatically assigning colors to multi-dimensional data. The colors are distinct (as much as possible) and also reflect the internal structure of the data (as much as possible).

See the published R package, the rdocumentation, or the latest github version documentation for details. Specifically, the vignette explains why and how to use this package.

Installation

To install it, use:

install.packages('chameleon')

Usage

In general, if you have a matrix whose rows represent some elements/observations and whose columns represent some variables/measurements, then use chameleon::data_colors to obtain a color for each row. You can pass this function the optional groups parameter which assigns a group to each row, to obtain a color for each group instead of a color for each row.

See the published R package, the rdocumentation, or the latest github version documentation's reference section for the list and description of the available functions.

Copy Link

Version

Install

install.packages('chameleon')

Monthly Downloads

280

Version

0.2-3

License

MIT + file LICENSE

Maintainer

Last Published

September 27th, 2022

Functions in chameleon (0.2-3)

pbmc

Sample scRNA data of PBMC metacells.
scale_color_chameleon

Setup a color scale of distinct discrete colors in ggplot2.
distinct_colors

Pick a number of distinct colors.
scale_fill_chameleon

Setup a fill scale of distinct discrete colors in ggplot2.
data_colors

Compute colors for multi-dimensional data.