get.edges.difference {dynamicnetwork} | R Documentation |
Given two networks, returns a vector of edgeIDs for edges in the second network that do not have a corresponding edge in the first. Mostly used for comparing the same network at two points in time in order to get a list of newly created edges.
get.edges.difference(network1, network2)
network1 |
first network to compare |
network2 |
second network to compare, ids will be from this network |
Uses the get.matching.edgeIDs
function to find edges in both
networks that have the same head and tail sets. Returns the ids of all edges
in the second network that do not have a match in the first.
vector of ids in the second network that do not have a match in the first.
Skye Bender-deMoll skyebend@skyeome.net
~put references to the literature/web site here ~
library(sna); #make two random graphs graph1 <- as.network(rgraph(10)); graph2 <- as.network(rgraph(10)); #find the edges in graph2 that are not in graph 1 diff <- get.edges.difference(graph1,graph2)