pipe_color_links: Color links

pipe_color_linksR Documentation

Color links

Description

Color links

Usage

pipe_color_links(
  graf,
  field = "link_id",
  lo = "#FCFDBF",
  hi = "#5F187F",
  mid = "#D3436E",
  fixed = NULL,
  fun = "count",
  value = 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 link 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'in the link table.


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