[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] How to store randomised network to object
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] How to store randomised network to object |
Date: |
Fri, 20 Mar 2009 02:30:41 +0100 |
Hello,
create a list of graphs:
graphs <- list()
for (j in 1:100) {
graphs[[ j ]] <- degree.sequence.game(p, method="vl")
}
or the same in bit more Rish:
graphs <- replicate(100, degree.sequence.game(p, method="vl"),
simplify=FALSE)
Btw. the parameter of degree.sequence.game() is not another network,
but a numeric vector, a degree sequence.
Best,
Gabor
On Fri, Mar 20, 2009 at 2:14 AM, Chang Jin Shin <address@hidden> wrote:
> Hello
>
> I have a really simple and stupid question.
> I want to randomise original network 100 times.
>
>
> SO, I do want to script like followings:
> ================================================
> p <- read.csv("netowrk.csv");
>
> For (j in 1:100){
> j <- degree.sequence.game(p, method="vl")
> }
> ================================================
>
> With my short knowlegdge of R and igraph
> I want every individual network generated by "degree.sequence.game" to
> object "j".
>
> Obviously, it does not work at all.
>
> QUESTION)
> How do I script randomized network to be stored in individual object?
>
> Would you advise me?
>
> Cheers,
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> UNIL DGM