igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] segmenting graphs


From: Gábor Csárdi
Subject: Re: [igraph] segmenting graphs
Date: Mon, 5 May 2014 16:26:41 -0400

On Mon, May 5, 2014 at 4:18 PM, Tom Wright <address@hidden> wrote:
Hi,
I'm trying to use iGraph in the R environment and I'm getting confused.
It seems to me that what I want to do should be simple but...

t<-graph.empty()
t<-t+vertices(c('r',LETTERS[1:9]))
t['r',D.vertices[,1],attr='weight']<-1

Error in as.igraph.vs(x, j) : object 'D.vertices' not found
 
t['A','B']<-1
t['r','A']<-FALSE

I want to get the subgraph with vertex 'A' as the root, i.e. vertices
{'A','B'}

What does this really mean? The whole tree rooted at 'A'? 

graph.neighborhood(t, 'A', order=vcount(t))[[1]]

Or something else?

Gabor

[...]

reply via email to

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