Description Usage Arguments Value Examples
Appends a column named "color" to a data frame containing hex codes (ready for usage in a plot) Three different columns from a data frame provide amounts for red, green and blue light, which combine into a color for each observation, thus allowing the user to represent simultaneaously up to three columns using color. Darker/lighter colors represent simultaneous low/high values for all values. Red/green/blue-ish colors represent high values in column1/2/3, but low ones in the remaining. Cyan/magenta/yellow-ish colors represent low values in column1/2/3, but high ones in the remaining.
1 2 |
df |
Data frame containing the original data. |
column1 |
A string containing the name of the column that will determine the output's amount of red light |
column2 |
A string containing the name of the column that will determine the output's amount of green light. |
column3 |
A string containing the name of the column that will determine the output's amounto of blue light. |
output_name |
Name for the column in which the output will be stored. Defaults to "color" |
avoid_white |
When set to TRUE, corrects colors that would be hard to distinguish in a white background. |
A data frame identical to df, except for an extra column (whose name is given by output_name) containing hexcodes.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.