dyad_census_attr: dyad census with node attributes

View source: R/dyad_census_attr.R

dyad_census_attrR Documentation

dyad census with node attributes

Description

dyad census with node attributes

Usage

dyad_census_attr(g, vattr)

Arguments

g

igraph object. should be a directed graph.

vattr

name of vertex attribute to be used.

Details

The node attribute should be integers from 1 to max(attr)

Value

dyad census as a data.frame.

Author(s)

David Schoch

Examples

library(igraph)
g <- sample_gnp(10, 0.4, directed = TRUE)
V(g)$attr <- c(rep(1, 5), rep(2, 5))
dyad_census_attr(g, "attr")

schochastics/netUtils documentation built on Oct. 17, 2024, 10:45 a.m.