mixmat: Create a mixing matrix

Description Usage Arguments Value Note Examples

View source: R/assortativity.R

Description

Function creates a mixing matrix by graph vertex attribute.

Usage

1
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.

Note

Mixing matrix original function written by Gary Weissman. See: https://gist.github.com/gweissman/2402741.

Examples

1
2
3
4
5
6
7
8
## 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)

## End(Not run)

VOSONDash documentation built on July 27, 2020, 5:07 p.m.