dyad_census_attr {netUtils} | R 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")
[Package netUtils version 0.8.2 Index]