Can you share the data? On Tue, 4 Jun 2019 at 15:57, Alexandre Souza <mraguga.so...@gmail.com> wrote:
> > Hello Gabor, > How are you!? > > I would like to understand with you about methods degree e betweness. > > I am compare this methods with sna methods for the same graph and the > result are differents. > > This is my single graph: > > rede4 <- read.table("c:/temp/Exemplo Rede_4_vertices.csv",header=TRUE,sep > = ";", dec=",") > # Adaptando o data.frame rede para que possa servir para a montagem da rede > grede4 <- rede4[,2:5] > rownames(grede4) <- rede4[,1] > rownames(grede4) > > Look my results about SNA: > > > sna::degree(grede4,gmode="graph",cmode="indegree") > [1] 2 2 2 2 > > sna::closeness(grede4,gmode="graph") > [1] 0.75 0.75 0.75 0.75 > > sna::betweenness(grede4,gmode="graph") > [1] 0.5 0.5 0.5 0.5 > > Look my results about igraph: > > library("igraph") > #transformando one-mode network matrix into an igraph object, > a = as.matrix(as.data.frame(lapply(grede4, as.numeric))) > a > net1 <- graph_from_adjacency_matrix(a, mode="undirected", weighted=NULL) > net1 > > > degree(net1, mode="out") > A B C D > 4 4 4 4 > > closeness(net1, mode="all") > A B C D > 0.25 0.25 0.25 0.25 > > betweenness(net1) > A B C D > 0.5 0.5 0.5 0.5 > > Can you help-me understand why the results about degree is different? > > grown up my graph, another differences show on. > > thanks very much. > > best regards. > > Att. > > > > > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > Livre > de vírus. www.avg.com > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>. > <#m_4287662025395222475_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > _______________________________________________ > igraph-help mailing list > igraph-help@nongnu.org > https://lists.nongnu.org/mailman/listinfo/igraph-help >
_______________________________________________ igraph-help mailing list igraph-help@nongnu.org https://lists.nongnu.org/mailman/listinfo/igraph-help