powered by
Converts Table to 'd3' Nodes and Links
d3_table(tB = NULL, vars = NULL, agg = "Freq")
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.
list
data.frames
networkD3
visNetwork
table to convert
table
character vector of column names
character
character column name of aggregated value
library(d3r) d3_table(Titanic, c("Class","Sex"))
Run the code above in your browser using DataLab