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 <[email protected]>: > 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 > > [...] -- 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) [email protected] http://giscience.uni-hd.de Berliner Straße 48, D-69120 Heidelberg, Germany fon: +49(0)6221 / 54 4370 _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
