igraph-help
[Top][All Lists]
Advanced

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

[igraph] Question about difference command


From: Tomas Olivier
Subject: [igraph] Question about difference command
Date: Mon, 18 Sep 2017 13:33:26 -0700

Hi,

I have a list of 60+ igraph objects. Although they are different networks (some with more vertices and edges than others), they all share a core set of vertices and edges. I would like to subtract that core set of vertices and edges from the 60+ networks in my list, ideally through some sort of loop. 

So far I've tried this (the 42nd graph in my original list "graph_list" has only the core structure that I want to remove from all graphs in my list). I would like generate a new list (reduced_graph_list) including graph objects that have only the vertices and edges that are unique to each graph, and this doesn't seem to be doing the trick. Do you have any suggestions?

reduced_graph_list = lapply(graph_list,function(x) difference(x, graph_list[[42]]))

Thank you!

Tomas

reply via email to

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