This function calculates modularity of two-mode networks. A vector of group assignment can be given for one of the two node sets which will make assignment more rapid.

twomode_modularity(mat, attr = NULL)

Arguments

mat

A matrix

attr

A vector of group assignment for the second mode node set (by default)

Value

A modularity score

Details

Note that this function has defaults that make sense for use with the gnevar datasets. Please contact me if you would like to make this function more general.

See also

Examples

twomode_modularity(mat, attr)
#> Error in attr == 1: comparison (1) is possible only for atomic and list types