I have a large directed network and I'm trying to create a subgraph of a subset of nodes and all nodes that connect to them. The problem is that the node names are id numbers. When I try and subset with "make_ego_graph" in igraph, I get the following error: Error in as.igraph.vs(graph, nodes) : Invalid vertex names
The subsetting seems to work fine when I create the network with names rather than numbers, but for precision's sake, I'd rather use the id numbers.
Has anyone come across this error before and could maybe provide a solution. Thank you for your help!