igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] subgraph in igraph


From: Peidong Chen
Subject: Re: [igraph] subgraph in igraph
Date: Sun, 3 May 2015 14:47:29 -0700

I think it is better to define functions by our own.

get_sub_graph <- function(subGraphNodes,g)
{
  nonSubGraphNodes <- which(!((1:vcount(g)) %in% subGraphNodes))
  subGraph <- delete.vertices(g , nonSubGraphNodes)
  subGraph
}

2015-05-03 14:24 GMT-07:00 Fatemeh a <address@hidden>:

thanks for your reply.
 this question raised because as you mention  "induced.subgraph"actually dose that , but I checked it  when we keep delete.vertices = FALSE and with one small example it dosen't change that, but i can't be sure and generalized it, so what about when we keep the vertices  ?

On Mon, May 4, 2015 at 1:39 AM, Peidong Chen <address@hidden> wrote:
I think it changes nodes indices, because like "induced.subgraph" function creates a totally new indices different from the original graph

2015-05-03 14:07 GMT-07:00 Fatemeh a <address@hidden>:
Hi all,

I have a question regards subgraph, dose supgraph.edges function changes nodes indices?  

thank you in advance,
Fatemeh

--
regards
F..A

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help




--
regards
F..A

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]