I set up a simple network as follows:
library(igraph)
library(qgraph)
g <- graph_from_literal(1-2, 1-3, 2-3, 2-4, 3-5, 4-5,4-6, 4-7, 5-6, 6-7)
However, the following problems occur when I want to use centralityPlot
centralityPlot(g, scale = "relative", include ="Degree") #This code runs normally.
centralityPlot(g, scale = "relative", include ="Strength") # This code cannot run, and an error is reported:Error in combine_vars().....
Then I tried to use strength (g) to get the strength of the nodes.
strength(g)
This code outputs the strength of each node. I want to know why centralityPlot (g, scale="relative", include="Strength") reports error. I'm very grateful for some advice.
I set up a simple network as follows: library(igraph) library(qgraph) g <- graph_from_literal(1-2, 1-3, 2-3, 2-4, 3-5, 4-5,4-6, 4-7, 5-6, 6-7)
However, the following problems occur when I want to use centralityPlot
centralityPlot(g, scale = "relative", include ="Degree") #This code runs normally. centralityPlot(g, scale = "relative", include ="Strength") # This code cannot run, and an error is reported:Error in combine_vars().....
Then I tried to use strength (g) to get the strength of the nodes. strength(g) This code outputs the strength of each node. I want to know why centralityPlot (g, scale="relative", include="Strength") reports error. I'm very grateful for some advice.