dw_feature_assort: Feature based assortativity coefficient

View source: R/assortativity.R

dw_feature_assortR 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 wdnet object that represents the network.

f1

A vector, represents the first feature of existing nodes. Number of nodes = length(f1) = length(f2). Defined for directed networks. If NULL, out-strength will be used.

f2

A vector, represents the second feature of existing nodes. Defined for directed networks. If NULL, in-strength will be used.

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)


wdnet documentation built on May 29, 2024, 9:32 a.m.