View source: R/dyad_census_attr.R
dyad_census_attr | R Documentation |
dyad census with node attributes
dyad_census_attr(g, vattr)
g |
igraph object. should be a directed graph. |
vattr |
name of vertex attribute to be used. |
The node attribute should be integers from 1 to max(attr)
dyad census as a data.frame.
David Schoch
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.