I want to use the library edgebundleR in R. But I get the following Error message if I want to parse the json file (edgebundle("test.json"):
Error in rjson::fromJSON(file = x) : no data to parse In addition: Warning message: In file(con, "r") : file("") only supports open = "w+" and open = "w+b": using the former
The json file looks like this:
[
{"name": "A.A1", "imports": ["Emp.Emp1", "Emp.Emp2"]},
{"name": "A.A2", "imports": ["Emp.Emp3", "Emp.Emp2"]},
{"name": "A.A3", "imports": ["Emp.Emp1", "Emp.Emp3"]},
{"name": "C.C1", "imports": ["Emp.Emp1", "Emp.Emp3"]},
{"name": "C.C2", "imports": ["Emp.Emp2", "Emp.Emp3"]},
{"name": "C.C3", "imports": ["Emp.Emp1", "Emp.Emp2"]},
{"name": "B.B1", "imports": ["Emp.Emp1", "Emp.Emp3"]},
{"name": "B.B2", "imports": ["Emp.Emp2", "Emp.Emp3"]},
{"name": "B.B3", "imports": ["Emp.Emp1", "Emp.Emp2"]},
{"name": "Emp.Emp1", "imports": ["A.A1","A.A3","B.B1","B.B3","C.C1","C.C3"]},
{"name": "Emp.Emp3", "imports": ["A.A3","A.A2","B.B2","B.B1","C.C2","C.C1"]},
{"name": "Emp.Emp2", "imports": ["A.A1","A.A2","B.B2","B.B3","C.C2","C.C3"]}
]
Here is my R code:
require(edgebundleR)
require(igraph)
library("rjson")
filepath = system.file("sampleData", "test.json", package = "edgebundleR")
edgebundle(filepath,width=800,fontsize=8,tension=0.95)
Refering on this: https://cran.r-project.org/web/packages/edgebundleR/README.html[enter link description here]1