igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] MST


From: Gábor Csárdi
Subject: Re: [igraph] MST
Date: Tue, 4 Dec 2012 16:00:51 -0500

See write.graph() and the 'ncol' format, i.e. something like this:

library(igraph)
g <- read.graph("file.txt", format= "ncol")
mst <- minimum.spanning.tree(g)
write.graph(mst, file="output.txt", format="ncol")

Gabor


On Tue, Dec 4, 2012 at 3:34 PM, Flavia Rovira <address@hidden> wrote:
Hello, 

I´m running the minimun.spanning.tree algorithm and I can´t see the output, how can I export the MST results into a .txt?
The imput txt is a three columns and n rows file, containing var1, var2 and edge, and i would need that the output has the same format. 

In previous versions this output was shown after entering the commands: 

library(igraph)
g <- read.graph("file.txt", format= "ncol")
minimum.spanning.tree(g)

I would thank if anyone can help

Flavia


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help




--
Gabor Csardi <address@hidden>     MTA KFKI RMKI


reply via email to

[Prev in Thread] Current Thread [Next in Thread]