[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] finding raw vertex index of a named vertex (R igraph)
From: |
Dr Gregory Jefferis |
Subject: |
Re: [igraph] finding raw vertex index of a named vertex (R igraph) |
Date: |
Thu, 03 May 2018 16:25:23 +0100 |
Thank you, Gabor.
On 2 May 2018, at 17:46, Gábor Csárdi wrote:
> match('1001', vertex_attr(gt, "name"))
match(1001, vertex_attr(gt, "name"))
is considerably faster than:
match(1001, names(V(gt))
Best,
Greg.
--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK
http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://flybrain.stanford.edu