Learn R Programming

d3r (version 1.1.0)

d3_table: Converts Table to 'd3' Nodes and Links

Description

Converts Table to 'd3' Nodes and Links

Usage

d3_table(tB = NULL, vars = NULL, agg = "Freq")

Value

list of two data.frames - one for nodes and one for links of the network. This structure is helpful when working with networkD3 and visNetwork.

Arguments

tB

table to convert

vars

character vector of column names

agg

character column name of aggregated value

Examples

Run this code
library(d3r)
d3_table(Titanic, c("Class","Sex"))

Run the code above in your browser using DataLab