get.edges.difference {dynamicnetwork}R Documentation

get ids of edges occuring in both networks

Description

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.

Usage

get.edges.difference(network1, network2)

Arguments

network1 first network to compare
network2 second network to compare, ids will be from this network

Details

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.

Value

vector of ids in the second network that do not have a match in the first.

Author(s)

Skye Bender-deMoll skyebend@skyeome.net

References

~put references to the literature/web site here ~

See Also

get.edges.intersection

Examples

   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)

[Package dynamicnetwork version 0.0-4 Index]