|
From: | jameson mcfarlane |
Subject: | Re: [igraph] Square Matrix /MST |
Date: | Wed, 8 Aug 2012 17:14:51 +0000 |
G, thank you. Here is the code:
library(igraph) D <- read.csv("New Jam.csv") D <- D[,-1] G <- graph.adjacency(as.matrix(D), weighted=TRUE) V(G)$label <- V(G)$name V(G)$shape <- "rectangle" V(G)$color <- "white" V(G)$size <- 40 mst <- minimum.spanning.tree(G) lay <- layout.reingold.tilford(G, mode="all") plot(mst, layout=lay) Thanks again > Date: Wed, 8 Aug 2012 13:07:58 -0400 > From: address@hidden > To: address@hidden > Subject: Re: [igraph] Square Matrix /MST > > Hi, I am not sure how you are converting your data file into an igraph > graph, probably you are trying to call graph.adjacency, and the data > file is clearly not an adajacency matrix. > > Please show us your code and we will tell you what is wrong. > > G. > > On Wed, Aug 8, 2012 at 12:58 PM, jameson mcfarlane > <address@hidden> wrote: > > Hello Everyone, > > I'm rather new to igraph. I am using Windows 7 to create an MST > > (Minimum Spanning Tree) with the attached data file. However, I keep getting > > that this data is not a square matrix. Any kind of help will be much > > appreciated. > > > > Thank you, > > Jameson > > > > _______________________________________________ > > igraph-help mailing list > > address@hidden > > https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > > > -- > Gabor Csardi <address@hidden> MTA KFKI RMKI > > _______________________________________________ > igraph-help mailing list > address@hidden > https://lists.nongnu.org/mailman/listinfo/igraph-help |
[Prev in Thread] | Current Thread | [Next in Thread] |