d3.graph: d3.graph

Description Usage Arguments Details Value

Description

d3.graph creates and htmlwidgets using force networks in D3. Inputs must be a data.frame in some specific format.

Usage

1
2
3
4
5
d3.graph(df, nodeMinSize = 6, nodeMaxSize = 12, edgeMinStroke = 0.05,
  edgeMaxStroke = 0.25, circleFillOpacity = 1, circleStroke = "black",
  circleStrokeWidth = 1, colors = c("#FF475C", "#F65C44", "#EE8442",
  "#E5A940", "#DDCB3D", "#BFD53B", "#93CC39", "#69C436", "#43BB34", "#32B344",
  "#30AA5F"), width = NULL, height = NULL)

Arguments

df

A data.frame which contains graph data. Some columns are expected. Every row is an edge.

  • "source"Required column. ID or Label of source/from node of the edge.

  • "target"Required column. ID or Label of target/to node of the edge.

  • "sourceLabel"Optional column. Label of source/from node of the edge

  • "targetLabel"Optional column. Label of target/to node of the edge

  • "sourceSize"Optional column. Size of source node of the edge. ize about 5-10 plots better.

  • "targetSize"Optional column. Size of target node of the edge. ize about 5-10 plots better.

  • "weight"Optional column. Weight of the edge.

circleFillOpacity

Opacity of nodes.

circleStroke

Color of stroke of nodes. In any format an html can understand.

circleStrokeWidth

Size of stroke of nodes.

colors

Array of colors in any format an html can understand.

width

Width of svg

height

Height of svg

Details

Inputs must be a data.frame, not data.table. It is expected to fix this in the future.

Value

An htmlwidget.


rocalabern/rWidgets documentation built on May 27, 2019, 12:13 p.m.