igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to write graphs in the list to edgelist


From: Gábor Csárdi
Subject: Re: [igraph] How to write graphs in the list to edgelist
Date: Sun, 22 Mar 2009 20:22:12 +0100

Hi, you overwrite "i.txt" every time you save a graph like this. Do
something like

...
filename <- paste(sep="", i, ".txt")
write.graph(graphs[[i]], file=filename, format="edgelist")
...

Gabor

On Sun, Mar 22, 2009 at 6:19 AM, Chang Jin Shin <address@hidden> wrote:
> Hi!
>
> I generated random graphs then put these into the list.
> I want to save(write) element of this list to text file.
>
> Would you advise me?
>
> ====================================================
> all <- read.graph("all.net", format="pajek")
> p <- degree(all)
>
> graphs <- list()
>
> for (j in 1:100) {
>  graphs[[ j ]] <- degree.sequence.game(p, method="vl")
> }
>
> **** Until this line code works well.
> --------------------------------------------------------
> **** From here it doesn't work.
>
> for (i in 1:100){
>        write.graph(graphs[[i]], "i.txt", "edgelist")
> }
>
> ====================================================
>
> With regards,
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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