igraph2graphjs: Convert 'igraph' graph objects to a simpler form used by...

Description Usage Arguments Value Examples

View source: R/graph.R

Description

Convert igraph graph objects to a simpler form used by graphjs

Usage

1

Arguments

ig

A graph object from igraph

Value

A list with node and edges data frame entries used by graphjs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  library(igraph)
  g <- make_ring(10) %>%
       set_edge_attr("weight", value = 1:10) %>%
       set_edge_attr("color", value = "red") %>%
       set_vertex_attr("name", value = letters[1:10])
  (G <- igraph2graphjs(g))

  # Can also directly run:
  graphjs(g)

## End(Not run)

threejs documentation built on May 19, 2017, 4:50 p.m.

Search within the threejs package
Search all R packages, documentation and source code