Learn R Programming

ufs (version 0.5.12)

areColors: Check whether elements of a vector are valid colors

Description

This function by Josh O'Brien checks whether elements of a vector are valid colors. It has been copied from a Stack Exchange answer (see https://stackoverflow.com/questions/13289009/check-if-character-string-is-a-valid-color-representation).

Usage

areColors(x)

Value

A logical vector.

Arguments

x

The vector.

Author

Josh O'Brien

Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com

Examples

Run this code

ufs::areColors(c(NA, "black", "blackk", "1", "#00", "#000000"));

Run the code above in your browser using DataLab