is_colour | R Documentation |
Check an object to see if it is a valid colour or set of colours.
is_colour(x) ## S3 method for class 'character' is_colour(x) ## S3 method for class 'numeric' is_colour(x) ## S3 method for class 'logical' is_colour(x) ## S3 method for class 'factor' is_colour(x)
x |
object to be tested. |
Colours in R can be represented by names (colours
), index number (palette
) or a hexidecimal character.
Ciaran Tobin
is_colour('#ffffff') is_colour('white') is_colour('periwinkle blue') is_colour(4L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.