[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] a problem with simplify()
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] a problem with simplify() |
Date: |
Thu, 21 Oct 2010 19:14:07 +0200 |
Just for the records, this version works with both kind of indexing:
delete.edges(g, E(g)[is.loop(g)])
Gabor
On Thu, Oct 21, 2010 at 7:06 PM, Tamas Nepusz <address@hidden> wrote:
>> Definitely, because your code does not take into account that edges are
>> reindexed after every deletion. I'd go for delete.edges(g, seq(0,
>> ecount(g)-1)[is.loop(g)])
> Or, even better: delete.edges(g, which(is.loop(g))-1) if your igraph version
> uses 0-based indexing. Note that the R interface of igraph 0.6 has recently
> switched to 1-based indexing, so if you installed igraph 0.6 in the last few
> days, you don't have to subtract 1.
>
> --
> T.
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> UNIL DGM
- [igraph] a problem with simplify(), Simone Gabbriellini, 2010/10/21
- Re: [igraph] a problem with simplify(), Gábor Csárdi, 2010/10/21
- Re: [igraph] a problem with simplify(), Simone Gabbriellini, 2010/10/21
- Re: [igraph] a problem with simplify(), Tamas Nepusz, 2010/10/21
- Re: [igraph] a problem with simplify(), Tamas Nepusz, 2010/10/21
- Re: [igraph] a problem with simplify(),
Gábor Csárdi <=
- Re: [igraph] a problem with simplify(), Simone Gabbriellini, 2010/10/21
- Re: [igraph] a problem with simplify(), Gábor Csárdi, 2010/10/21
- Re: [igraph] a problem with simplify(), Simone Gabbriellini, 2010/10/21