igraph-help
[Top][All Lists]
Advanced

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

[igraph] Question related to R implementation


From: Sylvain Loiseau
Subject: [igraph] Question related to R implementation
Date: Wed, 29 Aug 2007 10:48:54 +0200
User-agent: Opera Mail/9.21 (Linux)

Hi,

My question is perhaps not really related to the igraph library usage but rather to R. I'm curious to understand how the library is implemented. I'm particular, I'm wondering:

- How the vector of the object igraph.vs and igraph.es can be O-based? If I try :

  mode(V(g))

it answers :

  [1] "numeric"

It's probably usefull for linking with the C code, but how such a primitive R object as a vector can be redifined as being 0-based?

- I don't understand why the V(g) object can behave like a list (having "$" subscript: V(g)$name), if they are stored as vector.

- And a last question: what is this subscript syntax:

  V(g)[name == "foo"]

  Why don't we need to write

  V(g)[V(g)$name == "foo"]

  ?

Cheers,
Sylvain

--
Sylvain Loiseau
address@hidden
http://www.limsi.fr/~sloiseau

Fainéanter dans un monde neuf est la plus absorbante des occupations.

Nicolas Bouvier, /L'usage du monde/.




reply via email to

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