Update igraph.functions.R

added function to write node attributes to data frame