degree {simplegraph} | R Documentation |
Degree of vertices
Description
Degree of vertices
Usage
degree(graph, mode = c("out", "in", "total", "all"))
Arguments
graph |
Input graph. |
mode |
Whether to calculate |
Value
Named numeric vector of degrees.
Examples
G <- graph(list(A = c("B", "C"), B = "C", C = "A"))
degree(G, mode = "out")
degree(G, mode = "in")
degree(G, mode = "total")
[Package simplegraph version 1.0.1 Index]