Description Usage Arguments Details Value Author(s) Examples
View source: R/nearestScheme.R
The nearest scheme takes a data frame of values and colours and produces a colour scheme function that maps data values to the colour corresponding to the nearest value in the data frame.
1 | nearestScheme(valueColours)
|
valueColours |
a data frame with at least two columns, named 'col' and 'values'. The 'col' column must contain colour values and the 'values' column must be numeric. |
The numbers in the 'values' column should be unique, the returned colour is not clearly defined otherwise.
A colourscheme function.
Barry Rowlingson <b.rowlingson@lancaster.ac.uk>
1 2 | z=nearestScheme(data.frame(col=c("red","white","blue"),values=c(1,2,3)))
z(seq(0,4,len=6))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.