Going crazy with forceNetwork in R: no edges displayed

后端 未结 4 940
后悔当初
后悔当初 2021-01-20 17:44

I\'ve been trying to plot a network using networkD3 package in R for a week now. The simpleNetwork function works normally, but it doesn\'t allow much

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-20 18:12

    I have just fixed the same problem in my own forceNetwork. It turned out that the dataframe of edges that I had created (exported from iGraph) had character types, not int types. Casting the edge 'from' and 'to' columns using as.numeric() resolved the problem and the links drew correctly.

    I hope this helps.

    With regards,

    Will

提交回复
热议问题