netcompare: Comparing and testing network objects

Description Usage Arguments Details Value See Also Examples

Description

Compare or test network objects for (near) equality.

Usage

1
  netcompare(target, current, test = FALSE, ...)

Arguments

target,current

network objects, currently network and igraph classes are supported

test

logical, whether to perform the test or return comparison data, see Details

...

other arguments, currently ignored

Details

Arguments target and current can be network objects of one of the supported classes. They do not have to be of the same class though.

The function does a series of comparisons between target and current:

  1. The network structure comparison is made based on adjacency matrices (mind this when using for huge networks).

  2. Network/edge/vertex attributes are checked for presence in both objects.

  3. Common network/edge/vertex attribures are checked for equality.

All the results are collected in a list of class netcompare with an associated print method.

If test is TRUE then instead of the detailed test results the function returns TRUE or FALSE depending on some of the checks resulted positively. Currently attribute checks are ignored, i.e. what is taken into account is:

  1. Equivalence of adjacency matrices

  2. Directed / undirected character of the network

  3. Edge set size

  4. Vertex set size

Value

Depending on the value of test either an object of class netcompare containing the results of all the tests (if test=FALSE) or (if test=TRUE) a logical whether or not the networks are (nearly) the same.

See Also

all.equal, identical

Examples

1
2


Search within the intergraph package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.