rgexf (version 0.15.3)

igraph.to.gexf: Converting between gexf and igraph classes

Description

Converts objects between gexf and igraph objects keeping attributes, edge weights and colors.

Usage

igraph.to.gexf(igraph.obj, position=NULL)
gexf.to.igraph(gexf.obj)

Arguments

igraph.obj
An object of class igraph.
gexf.obj
An object of class gexf.
position
A three-column data-frame with XYZ coords.

Value

  • For igraph.to.gexf : gexf class object
  • For gexf.to.igraph : igraph class object

Details

If the position argument is not NULL, the new gexf object will include the position viz-attribute.

See Also

layout

Examples

Run this code
 ## Not run: 
#  
#   # Running demo
#   demo(gexfigraph)
#  
#   # A simple graph without
#   gexf1 <- read.gexf("http://gephi.org/datasets/LesMiserables.gexf")
#   igraph1 <- gexf.to.igraph(gexf1)
#   gexf2 <- igraph.to.gexf(igraph1)
#   
#   # A graph with attributes  
#   gexf3 <- read.gexf("http://gexf.net/data/data.gexf")
#   igraph2 <- gexf.to.igraph(gexf3)
#   gexf4 <- igraph.to.gexf(igraph2)
#  ## End(Not run)

Run the code above in your browser using DataCamp Workspace