Learn R Programming

inlcolor (version 1.0.6)

make_inlpal_class: Construct an inlpal-class object

Description

A constructor for the 'inlpal' class.

Usage

make_inlpal_class(x, call, nan = NA_character_)

Value

An object of class 'inlpal' that inherits behavior from the 'character' class. The returned object is comprised of a 'character' vector of n colors in the RGB color system. Colors are specified with a string of the form "#RRGGBB" or "#RRGGBBAA", where RR, GG, BB, and AA are the red, green, blue, and alpha hexadecimal values (00 to FF), respectively. Attributes of the returned object include: "names" is an the informal names assigned to colors in the palette, where NULL indicates no color names are specified; "nan" is a character string giving the color meant for missing data, in hexadecimal format, where NA indicates no color is specified; and "call" is an object of class 'call' giving the unevaluated function call (expression) that can be used to reproduce the color palette. Use the eval function to evaluate the "call" argument. A simple plot method is provided for the 'inlpal' class.

Arguments

x

'character' vector. Palette colors represented in hexadecimal format.

call

'call'-class object. Unevaluated function call (expression) that can be used to reproduce the color palette.

nan

'character' string. Color meant for missing data, in hexadecimal format, where NA indicates no color is specified.

Author

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center