Description Usage Arguments Details Value Author(s) Examples
View source: R/mixing-matrix.R
Using a categorical vertex attribute, construct a matrix depicting network mixing patterns.
1 2 | as_mixing_matrix(g, dim1, dim2 = NULL, direction = c("all", "out",
"in"))
|
g |
|
dim1 |
Either the name of a node/vertex attribute or vector of same
length as the number of nodes in |
dim2 |
If not provided, the same as |
direction |
|
If g
is undirected, dim1
corresponds to the rows of the returned
mixing matrix and dim2
corresponds to the columns.
If dim1
and dim2
refer to the same dimension/attribute, only the
upper triangle of the returned mixing matrix is used.
If g
is directed, the rows of the returned mixing matrix correspond
to the source of ties while the columns correspond to the target of ties.
<dtrMatrix>
g
is undirected and dim1
and dim2
refer to same dimension.
<dgeMatrix>
g
is directed or dim1
and dim2
refer to different dimensions.
<ddiMatrix>
g
exhibits 100
Brendan Knapp brendan.g.knapp@gmail.com
1 2 3 4 5 6 7 8 9 10 | as_mixing_matrix(jemmah_islamiyah, dim1 = "role")
as_mixing_matrix(jemmah_islamiyah, dim1 = "name", dim2 = "role")
data("sampson", package = "ergm")
as_mixing_matrix(samplike, dim1 = "vertex.names", dim2 = "group",
direction = "all")
as_mixing_matrix(samplike, dim1 = "vertex.names", dim2 = "group",
direction = "out")
as_mixing_matrix(samplike, dim1 = "vertex.names", dim2 = "group",
direction = "in")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.