arcd: Interactive arc-diagram

Description Usage Arguments Value Examples

View source: R/arcdiagram.R

Description

Interactive arc-diagram

Usage

1
2
3
4
5
6
7
8
arcd(links, nodes, link.source = "source", link.target = "target",
  link.side = NULL, link.color = NULL, link.value = "value",
  node.value = "value", node.label = "label", node.ID = "reindex",
  node.color = NULL, scale = 0.5, max.node.size = 40,
  min.node.size = 2, max.link.width = 30, min.link.width = 0.5,
  link.min.value = NULL, link.value.prefix = "jumps",
  node.value.prefix = "landings", remove.jump.size = NULL,
  orientation = "h", show.start = FALSE)

Arguments

links

a data-frame of links, contains three, sources and targets (populated with numeric node coordinates that serve as node IDs) and values of links. May contain other metadata

nodes

a data-frame of nodes, contains a column of numeric node coordinates (node IDs) that match those in the source and target columns in links and a column of node values. May contain other metadata

link.source

name of the source column in links

link.target

name of the target column in links

link.side

name of the column in links which is populated with 1 and -1 indicating which side to draw the link on. If NULL, will default to drawing all on one side

link.color

name of the column in links which is populated with color names for links. If NULL, will assume 'forestgreen' and 'red' for links on side 1 and -1, respectively

link.value

name of the column in links which is populated with the numeric link value, used to calculate link width

node.value

name of the column in nodes which is populated with the numeric node value, used to calculate node size

node.label

name of the column in nodes which is populated with node labels

node.ID

name of the column in nodes which is populated with numeric node IDs, serving as coordinates

node.color

name of the column in nodes which is populated with node color names. If NULL, will assume 'steelblue'

scale

controls the height of looping links compared to their length (links are semi-ellipses). Will not have visible effect if plotly is free to set plot scale

max.node.size

maximum node size

min.node.size

minimum node size

max.link.width

maximum link width

min.link.width

minimum link width

link.min.value

minimum link value to retain. Links with values below this will be ignored. The exception is if ALL links have values below link.min.value, in which case, to avoid creating an empty diagram, link.min.value will be set to the maximum link value present.

link.value.prefix

prefix to use in link hover labels

node.value.prefix

prefix to use in node hover labels

remove.jump.size

a value or a vector of values. Links with jump size (target minus source) in remove.jump.size will be ignored. If NULL, no effect.

orientation

if 'h', the diagram will be horizontal, otherwise vertical. Only the first character is checked, case-insensitive.

show.start

logical, whether or not to separate course start from outside by a dashed line.

Value

a plotly object

Examples

1
#

rushkin/bitsandends documentation built on Oct. 21, 2020, 11:43 a.m.