igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Problems with deleting vertices


From: Julian Hagenauer
Subject: Re: [igraph] Problems with deleting vertices
Date: Fri, 3 Aug 2012 06:57:47 +0200

Thank you for the answer.
This was, of casue, a simple answer to a stupid question.
But maybe the doc, where the example is basically from, is somehow
misleading.

Sincerely,
Julian

Am Thu, 2 Aug 2012 10:07:25 -0400
schrieb Gábor Csárdi <address@hidden>:

> On Thu, Aug 2, 2012 at 9:56 AM, Julian Hagenauer
> <address@hidden> 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
> 
> [...]



-- 
Dipl. Inf. Julian Hagenauer
Chair of GIScience, Research Assistant
Department of Geography, University of Heidelberg
   + Interdisciplinary Center for Scientific Computing (IWR)
   + Heidelberg Center for the Environment (HCE)

address@hidden
http://giscience.uni-hd.de
    
Berliner Straße 48, D-69120 Heidelberg, Germany
fon: +49(0)6221 / 54 4370



reply via email to

[Prev in Thread] Current Thread [Next in Thread]