GetColors | R Documentation |
Internal function: Get colors from a data frame containing at a minimum columns color and dataset
GetColors(filled_df)
filled_df |
a filled dataframe (see details) |
Get colors from a data frame containing at a minimum columns color and dataset. Columns on the right to dataset may contain subcategories, called subgroup_1, subgroup_2 etc. UPS: dataset and subgroup_s must be the right-most columns, see example below.
Named lists or nested lists of named lists
MS
df = data.frame(color=c(rep('red', 4), rep('green', 2)),dataset=c(rep('a',4), rep('b',2)), subgroup_1=c('x','x','y','y', 'x','y'), subgroup_2=1:6, stringsAsFactors=FALSE)
GetColors(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.