Hi, unfortunately we cannot run your code because we don't have the .csv file. Please send some self-contained example that reproduces the problem, e.g. make up some toy data. See e.g. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Thanks, Gabor On Mon, Apr 22, 2013 at 9:44 PM, jameson mcfarlane <[email protected]>wrote: > Hello, > I am creating a minimum spanning tree (MST) with i-graph. For some > reason, I seem to get a different MST diagram (nodes in different order) > each time I run it. For example, sometimes the primary tree node is say > "Jon K.". Other times, it could be "Larry Z." Could any help with what I am > doing wrong? > > Here is the code: > > library(igraph) > tab <- read.csv("NewJam12.csv") > tab <- tab[,-1] > g <- graph.adjacency(as.matrix(tab), weighted=TRUE) > V(g)$label <- V(g)$name > mst <- as.undirected(minimum.spanning.tree(g)) > > lay <- layout.reingold.tilford(mst, root=which.max(degree(mst))-1) > lay <- cbind(lay[,2], lay[,1]) # rotate > x11(width=20, height=10) > plot(mst, layout=lay, vertex.size= 5, vertex.size2=15, > vertex.shape="circle", asp=FALSE, > vertex.label.cex=0.5, vertex.color="green") > > > ------------------------------ > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > > -- Gabor Csardi <[email protected]> MTA KFKI RMKI
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
