RG_to_igraph function

Converts a relationship graph (RG) encoded as a list to an igraph object