[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] weight in two-mode to one-mode conversion
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] weight in two-mode to one-mode conversion |
Date: |
Thu, 7 Oct 2010 10:45:33 +0200 |
Simone, this is included in the 0.6 version:
M <- matrix( sample(0:1, 35, replace=TRUE), 5)
rownames(M) <- letters[1:5]
colnames(M) <- LETTERS[1:7]
g <- graph.incidence(M)
summary(bipartite.projection(g)[[1]])
The only difficulty is that the 0.6 R package is not compatible with
the 0.5 version, because it has 1-based vertex and edge id indexing.
But you can download a little bit older version of the 0.6 R package,
that already has this feature, but not yet the 1-based indexing, from
here:
http://code.google.com/p/igraph/downloads/detail?name=igraph_nightly_0.6-2030-20100726.tar.gz
I have just tried this and it seems to work fine.
Best,
Gabor
On Wed, Oct 6, 2010 at 5:08 PM, Simone Gabbriellini
<address@hidden> wrote:
> Hello List,
>
> I would like to store the number of affiliations each dyads share in a
> two-mode networks.
>
> I am wondering if there's a way, converting from the two-mode to the one-mode
> using bipartite.projection(), to add a weight parameter to the links in the
> one-mode that account for this.
>
> I am using the R interface.
>
> thanks in advance and regards,
> Simone
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> UNIL DGM