[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:43:05 +0100 |
Please stay on the list. Thanks. Yes, this is the way to do it.
G.
On Fri, Mar 20, 2009 at 2:35 AM, Chang Jin Shin <address@hidden> wrote:
> Thank you so much..
>
> p <- read.csv("network.csv")
> dp <- degree(p)
>
> graphs <- list()
> For (j in 1:100) {
> graphs[[j]] <- degree.sequence.game(dp, method="vl")
> }
>
> Is that right way to do?
>
> -----Original Message-----
> From: address@hidden [mailto:address@hidden On Behalf Of Gábor Csárdi
> Sent: Friday, 20 March 2009 11:31 AM
> To: Help for igraph users
> Cc: Chang Jin Shin
> Subject: Re: [igraph] How to store randomised network to object
>
> 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
>
--
Gabor Csardi <address@hidden> UNIL DGM