[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Graph attributes in R and C
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] Graph attributes in R and C |
Date: |
Wed, 20 Oct 2010 10:31:46 +0200 |
On Wed, Oct 20, 2010 at 5:51 AM, Matthew Walker
<address@hidden> wrote:
[...]
> In the process of doing this, I have discovered something interesting
> though:
>
> This writes out an attribute for each vertex:
>> library(igraph)
>> g <- erdos.renyi.game(5, 1.0)
>> V(g)$has_sensor <- 1
>> write.graph(g,"test.graphml","graphml")
>
> But this doesn't!
>> library(igraph)
>> g <- erdos.renyi.game(5, 1.0)
>> V(g)$has_sensor <- TRUE
>> write.graph(g,"test.graphml","graphml")
Again, write.graph() only writes the 'numeric' and 'string'
(=character in R) attributes. Most probably this will change in the
future, but that does not mean that the C attribute handler will be
able to load in any kind of R object as an attribute.
Gabor
--
Gabor Csardi <address@hidden> UNIL DGM