createNetworkFromIgraph {RCy3} | R Documentation

## Create a Cytoscape network from an igraph network

### Description

Takes an igraph network and generates data frames for nodes and edges to send to the createNetwork function. Returns the network.suid and applies the perferred layout set in Cytoscape preferences.

### Usage

    createNetworkFromIgraph(
      igraph,
      title = "From igraph",
      collection = "My Igraph Network Collection",
      base.url = .defaultBaseUrl,
      ...
    )

### Arguments

`igraph` | (igraph) igraph network object
`title` | (char) network name
`collection` | (char) network collection name
`base.url` | (optional) Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of RCy3.
`...` | params for nodeSet2JSON() and edgeSet2JSON(); see createNetwork

### Details

Vertices and edges from the igraph network will be translated into nodes and edges in Cytoscape. Associated attributes will also be passed to Cytoscape as node and edge table columns. Note: undirected networks will be implicitly modeled as directed in Cytoscape. Conversion back via `createIgraphFromNetwork` will result in a directed network. Also note: igraph attributes of type "other" denoted by "x" are converted to "String" in Cytoscape.

### Value

(int) network SUID

### See Also

createNetworkFromDataFrames, createIgraphFromNetwork

### Examples

    library(igraph)
    ig <- makeSimpleIgraph()
    createNetworkFromIgraph(ig)

[Package RCy3 version 2.10.2 Index]