delete nodes from a graph in a for loop

I have a graph (does not matter the number of nodes and edges), and I'm using for loop to delete some nodes from the graph in each iteration, my problem that after deleting the nodes I need to save the graph with the same name so I'm deleting and saving the new graph with the same name as follow : GR<-delete.vertices(GR,neig_nodes) I'm deleting neighbors of a specific node in each step, the R giving me this error message : Error in as.igraph.vs(graph, v) : Cannot use a vertex sequence from another graph. Thanks in advance

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.