Skip to content

Instantly share code, notes, and snippets.

@HeenaR17
Last active February 7, 2021 21:08
Show Gist options
  • Save HeenaR17/5815ae067ba433b6d82385946ac36be2 to your computer and use it in GitHub Desktop.
Save HeenaR17/5815ae067ba433b6d82385946ac36be2 to your computer and use it in GitHub Desktop.
#Hubs and authorities
hs <- hub_score(net)$vector
as <- authority.score(net)$vector
par(mfrow=c(1,2)) #to get one row, 2 columns and see 2 diagrams side by side
set.seed(123) #to get same configuration
plot(net,vertex.size=hs*30,main="Hubs",vertex.color=rainbow(52),edge.arrow.size=0.2,layout=layout.kamada.kawai)
plot(net,vertex.size=as*30,main="Authorities",vertex.color=rainbow(52),edge.arrow.size=0.2,layout=layout.kamada.kawai)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment