degree_of_separation: Calculate the average degree of separation for a network

Description Usage Arguments Details Value See Also Examples

Description

The function calculates the average degree of separation by repeated sampling of two nodes finding the shortest path between them.

Usage

1
degree_of_separation(in_network, repeats = 100)

Arguments

in_network

The network used for analysis

repeats

Nummber of repeated sampling of two random node paths

Details

To find the average connectedness of any two random nodes in a network the function degree_of_separation is used. The search algorithm is repeated multiple times (by default 100 times, but customizable by the user) for randomly selected node pairs in the network. A vector is returned, where each element is the degree of separation for a single iteration. The return vector can then be used to generate the network-specific distribution of connectedness.

Value

A vector with the pathlength of each sampling event.

See Also

See Also import_network, find_path

Examples

1
2
3
4
5
6
## Not run: 
network <- import_network("example_network_Cyt.txt")

DOS <- degree_of_separation(network, repeats=100)

## End(Not run)

CandidateBacon documentation built on May 2, 2019, 6:11 p.m.