igraph.to.gexf {rgexf}R Documentation

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.

Details

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

Value

Author(s)

George Vega Yon george.vega@nodoschile.org

See Also

layout

Examples

 ## 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)

[Package rgexf version 0.15.3 Index]