library(dogesr)
library(igraph)
data(doges.marriages)
# All families linked to the Contarinis
incident(doges.marriages.sn,as.numeric(V(doges.marriages.sn)["Contarini"]))
# Plot graph, with colors depending on the type of family
plot(doges.marriages.sn,vertex.color=V(doges.marriages.sn)$family.type.color)
# Show self-loops in the dataset
print(E(doges.marriages.sn)[which_loop(doges.marriages.sn)])
Run the code above in your browser using DataLab