r2d3 (version 1.0)

D3Chord: D3 Chord

Description

Creates a html file containing json file and a D3.js Chord diagram Needs json data from the jsonMatrix function

Usage

D3Chord(JSON, file_out)

Arguments

JSON
A json object
file_out
the location and name for the output html file

References

https://bl.ocks.org/mbostock/4062006

Examples

Run this code
dm<-matrix(c(11975,1951,8010,1013,5871,10048,16145,990,8916,2060,8090,940,2868,6171,8045,6907), 4,4)
labels<-c("Group1", "Group2", "Group3", "Group4")
json<-jsonMatrix(dm, labels)
D3Chord(json, file_out="chord.html")

Run the code above in your browser using DataLab