Skip to content
Prev 165678 / 398506 Next

how to get degree according to the name of the node?

Weijia You <weijiawx <at> gmail.com> writes:
This probably refers to the degree in the sna package. Assuming the 
example below, try to reformulate you problem (but please keep the code 
self-running, at least up the the point where the problem is).

Dieter 

library(sna)
set.seed(43)
g1 <- degree(rgraph(10))
g2 <- degree(rgraph(10))

g2 == g1 # is it this you need?