I have an edgelist of reproductive pairs as follows:
male_ID=c(1,2,3,4,5), female_ID=c(6,7,8,9,10), a=cbind(male_ID, female_ID)
using Igraph I generated a graph from the data, to plot and run some analysis on the full df:
g <- graph_from_data_frame(a)
My question is, can I now add an attribute (to colour vertices) for the sex of the individual, based on the column they are listed in the edgelist?