duckman
duckman

Reputation: 747

R: could not find function "igraph2graphjs"

I am trying to draw an interactive graph for a network using the threejs package. However, when I try to convert an igraph object to a threejs object, it gives the following error:

Error in igraph2graphjs(net) : could not find function "igraph2graphjs"

I have googled it and found no solution. Does anyone have an idea. I follow the tutorial site: http://kateto.net/network-visualization

Upvotes: 0

Views: 533

Answers (1)

Samuel
Samuel

Reputation: 3051

The problem is that you don't access to the igraph object net. And there is no function called igraph2graphjs in the current version (v0.3.1) of the threejs package as far as I can tell. It did exist in version 0.2.2. It seems the tutorial is outdated. Example code that works:

# SNAP Facebook ego network dataset
data("ego")
(graphjs(ego, bg="black"))

You use the graphjs function to create interactive 3D plots of igraph objects. No need for conversion.

There is a known issue regarding RStudio on Windows which results in graphics not being rendered:

RStudio on Windows systems may not be able to render the WebGL graphics emitted by threejs. RStudio users running on Windows systems may need to use the plot "pop out" button to see visualizations in an external browser. We expect this to be a temporary problem until the underlying graphics rendering system used by RStudio is updated later in 2017.

Upvotes: 1

Related Questions