Search code examples
rgraphnodesedges

Undirected Graph with edges weights and colors in R


Apologies in advance if this is trivial, but I lack the knowledge to even search for this properly.

I have the following type of data

    Nodes <- as.factor(toupper(letters[1:5]))
    Combs <- c("ABCE","ABE","ACE","ABCDE","BD")
    Weights <- c(1,4,8,15,20)
    data.frame(Combs,Weights)
      Combs Weights
    1  ABCE       1
    2   ABE       4
    3   ACE       8
    4 ABCDE      15
    5    BD      20

and I want to create the following Graph

So, the edges' colors represent the combinations of nodes found in the dataset while their thickness represents their weights. I would like the nodes to go in such a "circular" fashion with angles (or curves). Any ideas whether it is possible to do this in R with some existing package?

Thank you very much in advance.


Solution

  • Maybe qgraph could help you.

    Best regards

    Pavlo