igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] simple example, graph.incidence skips directed parameter


From: Gábor Csárdi
Subject: Re: [igraph] simple example, graph.incidence skips directed parameter
Date: Mon, 8 Jun 2009 11:42:14 +0200

Jose, thanks for the report, this was a bug. I have fixed it, and here
is a workaround that works with the currently released version:

i <- igraph:::graph.incidence.dense(inc, directed=TRUE, mode="out",
                                    weighted=NULL, multiple=FALSE)

It is not perfect, because in fact the 'mode' parameter will be always
'out', no matter what you set (for unweighted graphs at least), but
you can transpose the incidence matrix and then have the same as you
would with mode=="in".

Thanks again, best,
Gabor

On Fri, Jun 5, 2009 at 3:00 PM, Jose Quesada<address@hidden> wrote:
> Hi Gabor, Tamar, (all),
>
> In this simple example, graph.incidence skips directed parameter.
>
> inc <- matrix(sample(0:1, 15, repl=TRUE), 3, 5)
> colnames(inc) <- letters[1:5]
> rownames(inc) <- LETTERS[1:3]
> i <- graph.incidence(inc, directed=T)
> summary(i) # it's not a directed graph
>
> I have no idea why, because it certainly works on other (bigger)
> networks I'm using.
> Thoughts?
>
> Best,
> -Jose
>
> --
> Jose Quesada, PhD.
> Max Planck Institute,
> Center for Adaptive Behavior and Cognition -ABC-,
> Lentzeallee 94, office 224, 14195 Berlin
> http://www.josequesada.name/
>
>
>
> _______________________________________________
> 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]