Help: Create ids of an igraph graph using “internal” ids



I’m using igraph package in R. I’ve created a random smallworld graph using sample_smallworld function. Now I’d like to set ids of the vertices of this new graph equal to their “internal” ids (i.e. to those “ids” which one gets using print(V(graphname)) ). How can I do it? Thanks in advance.

Best regards, Evgeny.


Hi @evt77ch, could you provide a reproducible code? That will help in finding solution to your problem.