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 <[email protected]>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
> [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