## Not run:
# # Data frame of nodes
# people <- data.frame(id=1:4, label=c("juan", "pedro", "matthew", "carlos"),
# stringsAsFactors=F)
#
# # Data frame of edges
# relations <- data.frame(source=c(1,1,1,2,3,4,2,4,4),
# target=c(4,2,3,3,4,2,4,1,1))
#
# # Building gexf graph
# mygraph <- write.gexf(nodes=people, edges=relations)
#
# # Summary and pring
# summary(mygraph)
#
# print(mygraph, file="mygraph.gexf", replace=T)
#
# # Plotting
# plot(mygraph)
#
# ## End(Not run)
Run the code above in your browser using DataLab