dw_feature_assort {wdnet} | R Documentation |
Feature based assortativity coefficient
Description
Node feature based assortativity coefficients for weighted and directed networks.
Usage
dw_feature_assort(netwk, f1, f2)
Arguments
netwk |
A |
f1 |
A vector, represents the first feature of existing nodes. Number of
nodes |
f2 |
A vector, represents the second feature of existing nodes. Defined
for directed networks. If |
Value
Directed weighted assortativity coefficients between source nodes'
f1
(or f2
) and target nodes' f2
(or f1
).
Examples
set.seed(123)
adj <- matrix(rbinom(400, 1, 0.2) * sample(1:3, 400, replace = TRUE), 20, 20)
f1 <- runif(20)
f2 <- abs(rnorm(20))
ret <- assortcoef(adj = adj, f1 = f1, f2 = f2)
[Package wdnet version 1.2.3 Index]