On Thu, Aug 2, 2012 at 9:56 AM, Julian Hagenauer
<[email protected]> wrote:
> Hello,
> somehow igraph does not delete vertices for me.
> Am i doing something wrong?
>
>> g<-graph.ring(10)
>> vcount(g)
> [1] 10
>> delete.vertices(g,c(2,7,8))
> IGRAPH U--- 7 5 -- Ring graph
> + attr: name (g/c), mutual (g/x), circular (g/x)
>> vcount(g)
> [1] 10

R functions do not modify objects in place. They return the result.
I.e. you need to write this:

newg <- delete.vertices(g, c(2,7,8))

Gabor

[...]
-- 
Gabor Csardi <[email protected]>     MTA KFKI RMKI

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to