r2d3 (version 1.0)

jsonMatrix: Matrix json

Description

Creates a json file of sequence frequencies. This json will work with D3 Sunburst

Usage

jsonMatrix(matrix, labels)

Arguments

matrix
An x by x data matrix
labels
An vector of x length containing labels for the matrix

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)

Run the code above in your browser using DataCamp Workspace