powered by
Checks if the supplied vector contains valid colours.
is.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.
length(cols)
TRUE
FALSE
# NOT RUN { all(is.cols(1:5)) all(is.cols(heat.colors(30))) any(!is.cols(c("red", "green", "aquamarine"))) # }
Run the code above in your browser using DataLab