igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] R: ragged attributes


From: Gábor Csárdi
Subject: Re: [igraph] R: ragged attributes
Date: Thu, 2 Jun 2011 10:13:30 -0400

Tuan,

a possible way to store your attributes outside of the graph, in a
list. Attributes of vertex 0 are in the first list element, etc. This
works, if you don't change the structure of the graph. If your graphs
are dynamic, then you can assign an id vertex attribute to the graph
to keep track of the attributes after vertex/edge deletion.

You can also use complex R objects as vertex/edge attributes, say a
list for each vertex and each edge. The only drawback is that these
are not exported/imported. They are kept if you load/save the graph.

Best,
G.

On Thu, Jun 2, 2011 at 1:12 AM, Tuan Q. Phan <address@hidden> wrote:
> Hello,
>
>   Is there a way to set ragged attributes to vertices in R for quick search
> (value exists operations)?  That is, I have a large number of attributes
> (and nodes), and it's not feasible to set it as "fixed-width" where every
> node has the same number of attributes.
>
>   I'm thinking the C way to do this would be to store a pointer to an array.
> is there something equivalent in R?
>
> Thanks!
> Tuan
> --
> Tuan Q. PHAN
> Doctor of Business Administration (Harvard)
> cell: (213) 804-9432
> skype: tuanqphan
> address@hidden
> http://www.tuanqphan.com
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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