Last chance! 50% off unlimited learning
Sale ends in
degree(graph, v=V(graph), mode = "total", loops = TRUE)
degree.distribution(graph, cumulative = FALSE, ...)
degree
,
eg. mode
is useful but also v
and loops
make
sense.degree
a numeric vector of the same length as argument
v
. For degree.distribution
a numeric vector of the same length as
the maximum degree plus one. The first element is the relative
frequency zero degree vertices, the second vertices with degree one,
etc.
g <- graph.ring(10)
degree(g)
g2 <- erdos.renyi.game(1000, 10/1000)
degree.distribution(g2)
Run the code above in your browser using DataLab