pipe_color_factors: Color factors (background color)

pipe_color_factorsR Documentation

Color factors (background color)

Description

Color factors (background color)

Usage

pipe_color_factors(
  graf,
  field = "frequency",
  lo = "#FCFDBF",
  hi = "#9F189F",
  mid = "#D5438E",
  fixed = NULL,
  pal = 1
)

Arguments

graf

A mapfile representing a causal map. A mapfile is a tidygraph, which consists of a table of edges linked to a table of nodes, with an optional additional table of statements. In this package, nodes are called 'factors' and edges are called 'links.'

field

A numerical or character field in the factor table. If it is character, the other parameters are ignored and a color-blind friendly qualitative palette is applied.

lo

Optionally, a color specification for the low end of the color range. Default is 'green'.

hi

Optionally, a color specification for the high end of the color range. Default is 'blue'.

mid

Optionally, a color specification for the middle of the color range. Default is 'gray'.

fixed

Optionally, a color specification which will be applied everywhere and overrides 'field'.

Value

A mapfile with a new or overwritten column 'color.background'in the factor table.


stevepowell99/CausalMapFunctions documentation built on Oct. 12, 2023, 11:13 a.m.