add_labels_and_colors | R Documentation |
Add Labels And Colors
add_labels_and_colors(
df,
var,
coloration.key = NULL,
title = "",
share.title = "",
period.title = ""
)
df |
the data frame to be joined |
var |
The variables (column names) for which to add levels |
title |
The title to apply to apply in the column_key, for a new variable |
share.title |
The share.title to apply in the column_key, for a new variable |
coloration.key=NULL |
The coloration.key to apply, if null use an existing one |
This function adds a new set of levels to the files used to track standard colors and orders. It first checks whether the var and coloration.key already exist in the column_key file, then it fills in any new levels to the Lookup_coloration.csv file. Users will need to first have cloned the lookup-tables repository. Typically manual adjustment of Lookup_coloration.csv will still be necessary, but should be less tedious
A new data frame built on the variable var. It will include colors, and order, and proper name labels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.