is.cols | R Documentation |
Checks if the supplied vector contains valid colours.
is.cols(cols)
cols |
A vector of colours, usually as a character string. |
A logical vector of length length(cols)
which is TRUE
for entries which are valid colours and FALSE
otherwise.
all(is.cols(1:5))
all(is.cols(heat.colors(30)))
any(!is.cols(c("red", "green", "aquamarine")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.