c1Local.multiplex: c1 local clustering coefficients for multiplex networks

Description Usage Arguments Details Value Warnings References See Also Examples

Description

Computes Battiston et al. (2014)'s C1 local clustering coefficient of a multiplex network.

Usage

1
2
3
4
c1Local.multiplex(obj,
                  indexNode = 1:length(nodes.multiplex(obj)),
                  indexLayer = 1:length(layers.multiplex(obj))
                  )

Arguments

obj

An object of class multiplex.

indexNode

A vector of IDs (or labels) for the selected nodes on which to calculate the C1 local clustering coefficient.

indexLayer

A vector of IDs (or labels) for the selected (intra)layers on which to calculate the C1 local clustering coefficient.

Details

Instead of the classical definition of transitivity and local clustering coefficient, this index accounts for all the possible triadic structures that takes form even considering interlayers relationships. The index is defined, for a certain node v_i (possibly selected with indexNode argument) as the ratio between the number of 2-triangles that contains v_i, and (L - 1) times the number of 1-traids centred in v_i, defined L as the number of (intra)layers taken into consideration.

Function use permutations() function from gtools package. More informations available at https://cran.r-project.org/web/packages/gtools/index.html.

Value

A numerical vector with all the C1 local clustering coefficients for the nodes selected in indexNode argument.

Warnings

Note that the C1 local clustering coefficient can be defined for a multiplex network with, at least, 2 (intra)layers. So, if indexLayer argument has length 1, the function produces an error and halts.

References

Battiston et al. (2014) Structural measures for multiplex networks. Phys. Rev. E 89, 032804.

See Also

create.multiplex, C1Global.multiplex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Loading Aarhus CS Department dataset.

data(aarhus_mplex)

# Creating the multiplex object using the dataset loaded into aarhus_mplex object.

mplexObj <- create.multiplex(nodes = aarhus_mplex$nodes,
                            layersNames = aarhus_mplex$layerNames,
                            layer1 = aarhus_mplex$L1,
                            type1 = "undirected",
                            aarhus_mplex$L2,
                            aarhus_mplex$L3,
                            aarhus_mplex$L4,
                            aarhus_mplex$L5
                            )

# Computing the so-called c1 clustering index for the nodes of the multiplex network:

c1Local.multiplex(mplexObj)

# It can be useful to select just some nodes or layers on which to calculate the
# c1 clustering index. This can be easily done with 'indexNode' and 'indexLayer' arguments:

c1Local.multiplex(mplexObj,
                  indexNode = sample(1:length(nodes.multiplex(mplexObj)), 10),
                  indexLayer = c(1, 3, 4)
                  )

Achab94/mplex documentation built on May 5, 2019, 11:46 a.m.