Learn R Programming

VOSONDash (version 0.5.7)

mixmat: Create a mixing matrix

Description

Function creates a mixing matrix by graph vertex attribute.

Usage

mixmat(g, attrib, use_density = TRUE)

Arguments

g

igraph graph object.

attrib

Character string. Vertex attribute or category.

use_density

Logical. Use edge density. Default is TRUE.

Value

A mixing matrix.

Examples

Run this code
# NOT RUN {
# create a mixing matrix of the demonstration network based on vertex 
# categorical attribute for political stance "vosonCA_Stance"
g <- loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")

mm <- mixmat(g, "vosonCA_Stance", use_density = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab