[BioC] a question about graph in R

Seth Falcon sfalcon at fhcrc.org
Sun Nov 22 05:11:08 CET 2009

Hi Jiabao,

On 11/20/09 11:26 PM, jiabao xu wrote:
> hello,everyone:
> I have two graphs: G1(V,E) ,G2(V2,E2) (V2∈V,E2∈E),how to got the G(V1,E1)
> ,G1∪G2=G,V1∪V2=V,E1∪E2=E.

The graph package has intersection() and union() functions that may give 
you what you want.

If not, perhaps you can give a more detailed example for what you want. 
  In particular, I'm not sure I understand your notation.  Looks to me 
like you have defined G2 such that V2 is a subset of V and E2 a subset 
of E and G1 is (V, E).  So then union(G1, G2) is just G1?

+ seth

More information about the Bioconductor mailing list