Skip to contents

One edge (link) in a network. The R analog of the GraphEdge TypeScript interface in rtemislive (~/Code/live/src/lib/types.ts).

Usage

GraphEdge(
  source = character(0),
  target = character(0),
  weight = NULL,
  sign = NULL
)

Arguments

source

Character: Source node id.

target

Character: Target node id.

weight

Optional Numeric: Edge magnitude; drives thickness. For a correlation graph, the absolute value of r.

sign

Optional Numeric {-1, 1}: Sign of the underlying value (e.g. correlation): 1 positive, -1 negative. Drives edge color when present.

Value

GraphEdge object.

Examples

GraphEdge(source = "a", target = "b", weight = 0.8)
#> <rtemis.draw::GraphEdge>
#>  @ source: chr "a"
#>  @ target: chr "b"
#>  @ weight: num 0.8
#>  @ sign  : NULL