is.cols {IMIFA}R Documentation

Check for Valid Colours

Description

Checks if the supplied vector contains valid colours.

Usage

is.cols(cols)

Arguments

cols

A vector of colours, usually as a character string.

Value

A logical vector of length length(cols) which is TRUE for entries which are valid colours and FALSE otherwise.

Examples

all(is.cols(1:5))

all(is.cols(heat.colors(30)))

any(!is.cols(c("red", "green", "aquamarine")))

[Package IMIFA version 2.2.0 Index]