[Top][All Lists]

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

Re: [igraph] RES: RES: RES: Egonetworks in Igraph

From: Gábor Csárdi
Subject: Re: [igraph] RES: RES: RES: Egonetworks in Igraph
Date: Thu, 15 Sep 2011 14:10:18 -0400

On Thu, Sep 15, 2011 at 1:52 PM, Carlos Eduardo <address@hidden> wrote:
> I followed the steps indicated by you (g <- graph.ring(10) and so on) and
> the $name worked. However, when I am using my network, I can't do this. I
> don't know why! The network follow attached (graphML format). If you don't
> mind, might you check what could be happening with my network?

Your network has no vertex attribute called 'name'. Maybe you have and
'id' attribute and want to use that as 'name':
V(g)$name <- V(g)$id

Perhaps you can do the same in Visone, i.e. adding a vertex attribute
called 'name'. How does Visone convert a graph to an igraph graph? I
have no idea. Since this works fine without Visone, maybe you want to
contact the Visone authors.

I cannot even read this file, btw.:
> g <- read.graph("trade_1_graphml", format="graphml")
Error in read.graph.graphml(file, ...) :
  At foreign-graphml.c:523 : Cannot parse GraphML file, unknown
attribute type, Parse error

> b)I don't get this. How would you convert a list of graphs to a graph? And
> why? Don't you just want to take the first (and only) graph from the list?
> I deal with Igraph through Visone R Console (http://visone.info/). I want to
> identify egonetworks inside a bigger network. After that, I want to
> visualize the egonetworks through Visone. However, Visone just recognize
> "igraph" objects to built graphs. What is happening is that I could see the
> egonetwork in R Console, but I couldn't send it to Visone. So, if be
> possible to see the egonetwork (graph.neighborhood) as "igraph" class, it
> would be more useful to my application.

I still don't understand why you cannot simply take the graph out of
the list returned by graph.neighborhood?
You need a function that returns the graph? Then define a function for it:

ego <- function(graph, vertex) graph.neighborhood(graph, 1, vertex)[[1]]

What is wrong with this?


Gabor Csardi <address@hidden>     MTA KFKI RMKI

reply via email to

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