Thanks very much. Cesar ---------------------------------------------------------------------- Cesar Caballero MRI engineer www.bcbl.eu
Twitter: @caballerogaudes www.researchgate.net/profile/Cesar_Caballero2 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer ----- Original Message ----- From: "Tamas Nepusz" <[email protected]> To: "igraph-help" <[email protected]> Sent: Thursday, October 29, 2015 10:47:38 PM Subject: Re: [igraph] delete connected vertices of to-be-deleted vertices Hi Cesar, > But, does this step ALSO remove THEIR CONNECTED VERTICES? No - quite unsurprisingly, delete.vertices() will delete only those vertices that you specify explicitly. > If not, how can I achieve this? Use the ego() function to extract the list of vertices that are at most a given number of steps to a given seed vertex, followed by unlist() and unique(): vs <- c(1,2,3,4) unique(unlist(ego(g, 1, vs))) This gives you a numeric vector that contains the seed vertices (in vs) and all the vertices that are neighbors of at least one seed vertex. T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
