add_labels_and_colors: Add Labels And Colors

View source: R/Plot_Labels.R

add_labels_and_colorsR Documentation

Add Labels And Colors

Description

Add Labels And Colors

Usage

add_labels_and_colors(
  df,
  var,
  coloration.key = NULL,
  title = "",
  share.title = "",
  period.title = ""
)

Arguments

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

Details

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

Value

A new data frame built on the variable var. It will include colors, and order, and proper name labels.


CSISdefense/csis360 documentation built on Feb. 1, 2025, 1:22 p.m.