igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] removing vertices from a graph


From: Tamas Nepusz
Subject: Re: [igraph] removing vertices from a graph
Date: Tue, 25 Aug 2009 00:25:10 +0100

Hi Eric,

Try delete.vertices:

http://igraph.sourceforge.net/doc/R/graph.structure.html

-- Tamas

On 2009.08.24., at 23:52, Eric Sun wrote:

Hi,

I’m using igraph in R, and I’m trying to remove the vertex in a graph with the largest degree (or any indexed vertex).
Is there an easy way to do this?

The documentation talks about remove.graph.attribute(), but this appears to be only for the graph metadata. I didn’t see any functions that allow removal of a vertex.

Example:
> degrees = degree(graph)
> which.max(degrees)
[1] 274731
> degrees[274731]
[1] 5232

I’d like to remove node #274731 and return the new graph.

Thanks in advance!
Eric
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

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