layers.multiplex: Extraction of the layers' dataframes

Description Usage Arguments Value See Also Examples

Description

The function allows a user-friendly method for extracting the information about selected layers of the multiplex network.

Usage

1
layers.multiplex(obj, index = 1:length(obj$layers), label = FALSE)

Arguments

obj

An object of class multiplex.

index

A vector of the layers' IDs selected for the extraction. By default, the vector contains the IDs of all the layers of the network.

label

FALSE by default. If TRUE, the function extracts only the labels of the selected layers.

Value

A list with the layers' data.frame structures selected by the index argument.

See Also

create.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
28
29
30
31
32
# 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
                            )

# Extracting the edges of the layers (relationships):

layers.multiplex(mplexObj)

# Edges can be extracted even for some specific layers (for example, the
# second and third layers), selected with the 'index' argument:

layers.multiplex(mplexObj, index = c(2, 3))

# or, easily, referring to their names:

layers.multiplex(mplexObj, index = c("facebook", "coauthor"))

# The 'label' argument, if TRUE, returns the names/labels of the selected layers:

layers.multiplex(mplexObj, index = c(2, 4), label = TRUE)

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