library(dupNodes)
library(igraph)
data("florentine.sn")
# All families linked to the Medici
incident(florentine.sn,as.numeric(V(florentine.sn)["MEDICI"]))
# Self loops
E(florentine.sn)[which_loop(florentine.sn)]
Run the code above in your browser using DataLab