complete_network {SDDE} | R Documentation

## compare two given networks (original and augmented, presented as undirected graphs) using a path analysis

### Description

This function computes the number of paths in each category for all pairs of nodes of the original network.

### Usage

    	complete_network(g1,g2,
    					     taxnames,
    					     maxdistance=0,
    					     maxtime=3600,
    					     maxnode=0,
    					     verbose=FALSE,
    					     file="log.txt",
    					    maxcores=1,
    					    node1,
    					    node2
    					)

### Arguments

`g1` | the original network X
`g2` | the augmented network Y with additional nodes (all the original nodes from X must be present in the augmented network Y)
`taxnames` | the taxon name of the nodes added to the original graph (default: we select all nodes that are not in g1)
`maxnode` | the maximum number of augmented nodes in network Y to take into account (default=0, no maximum number of augmented nodes to take into account. The augmented nodes are sorted by distance to the investigated node pairs by the algorithm.)
`maxtime` | the maximum search time per pathway (default=3600 seconds)
`maxdistance` | the maximum search distance to the added nodes in network Y (default=0, no maximum distance for augmented nodes to take into account)
`verbose` | flag to save into a file additionnal informations regarding the obtained paths (default=FALSE, the file name should be indicated)
`file` | filename to save the additionnal informations
`node1` | if node1 is set,we look only for paths starting from node1
`node2` | if node2 is set, we will only look at the paths starting at node1 and ending at node2
`maxcores` | maximum number of cores to use (default=1, use 0 to use half of the total cores available )

### Value

This function returns the number of paths of each category: Shortcuts, Detours, Dead ends, Equal paths and disconnected nodes.
If some of the augmented nodes are not visited because of the limits defined by `maxnode`, `maxtime` or `maxdistance`, a path can also be classified as Detour or Dead End.

### Examples

    ## Searching the sample data (containing 11 original nodes and 3 augmented nodes)
    data(Sample_1)
    result <- complete_network(g1, g2)
    print(result)
    ## Results:
    ##
    ##          disconnected nodes shortcuts equals detours dead ends
    ##user.self                 18         4      5      26         2
    ##          Dead ends or detour total user time system time real time
    ##user.self                   0    55     0.997       0.111     2.186
    ##
    ## Searching for path x1 -> x2 in the sample data
    ## Not run: complete_network(g1, g2,node1="x1", node2="x2")
    ##
    ## Specifying a limit on time (60 seconds) and maximum distance (2) of
    ## an original node to an augmented node
    ## Not run: complete_network(g1, g2, maxtime=60, maxdistance=2)

[Package SDDE version 1.0.1 Index]