triversity (version 1.0)

tripartite_example: An example of dataframe encoding a small tripartite graph.

Description

tripartite_example is a data.frame containing raw data that encodes a small tripartite graph. It has the proper format to be loaded by get_tripartite. It contains four columns. Each row gives a link between two nodes belonging to two different levels of the tripartite graph. The first column gives the level of the first node (any integer in {1, 2, 3}) and the second column gives its name (any character string). Similarly, the third and fourth columns give the level and the name of the second node. A fifth column could eventually be added to give the weights of the links (any positive integer or float value).

Usage

data(tripartite_example)

Arguments

Format

An object of class data.frame with 11 rows and 4 columns.

Examples

Run this code
# NOT RUN {
data (tripartite_example)
head (tripartite_example)

# Load the data.frame into a proper data structure
tripartite <- get_tripartite (data=tripartite_example)

# Get the names of the nodes in the second level of the tripartite graph
tripartite$nodes$level2

# Get the transition matrix of a random walk going from the level 2 to level 1
tripartite$transitions$level2$level1$mat
# }

Run the code above in your browser using DataLab