colour-mixing-math | R Documentation |
These functions mix colour vectors with math functions.
## S3 method for class 'palettes_colour'
sum(..., na.rm = FALSE)
## S3 method for class 'palettes_colour'
cumsum(x)
... |
Colour vectors of class |
na.rm |
Whether to include missing values. Either |
x |
An object of class |
These functions return colour vectors of class
palettes_colour
:
sum()
returns the sum of all the colours present in its arguments with
additive colour mixing.
cumsum()
returns a vector whose elements are the cumulative sums of the
elements of the argument with additive colour mixing.
x <- pal_colour(c("red", "blue"))
sum(x)
x <- pal_colour(c("red", "blue", "yellow"))
cumsum(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.