igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] IGraphR: Using igraph from Mathematica


From: Gábor Csárdi
Subject: Re: [igraph] IGraphR: Using igraph from Mathematica
Date: Wed, 28 Jan 2015 17:09:49 -0500

This is very cool! I would be happy to link it from the homepage if you want, or from the Github README, just need to find out the best way of doing it. Write me an email in private or open an issue in the Github repo if you are interested.

Thanks! Best,
GAbor

On Mon, Jan 26, 2015 at 4:38 PM, Szabolcs Horvát <address@hidden> wrote:
Hello igraph users,

I would like to bring your attention to a small Mathematica package I
wrote that makes it possible to use igraph from within Mathematica.

https://github.com/szhorvat/IGraphR
http://szhorvat.net/pelican/using-igraph-from-mathematica.html

igraph already has interfaces for C, R & Python, and this package adds
one more.  It actually communicates with R/igraph through
Mathematica's RLink.  Mathematica also has a built-in graph datatype
and many graph processing functions.  This package will auto-translate
between Mathematica and igraph graphs.  I find that igraph's and
Mathematica's functionality complement each other nicely.

Usage is simple:  just wrap any R/igraph function with IGraph[...] and
use it as if it were a Mathematica function.

For example, let's make a random graph with the same degree sequence
as Zachary's karate club network:

g = address@hidden@address@hidden"NetworkGraph",
"ZacharyKarateClub"}];

igraph can do this too, but Mathematica uses a different and exact
algorithm.  igraph's is much faster but only approximate.

Now let's find it's edge and vertex betweenness using igraph:

IGraph["edge.betweenness"][g]
IGraph["betweenness"][g]

We can also generate a graph using igraph and return it to Mathematica:

IGraph["barabasi.game"][20]

The package supports directed and undirected graphs, multigraphs, and
arbitrary vertex names.

I have posted about this package a year or so ago but at that time it
was much less complete and had some bugs.  If you have the old
version, please upgrade: https://github.com/szhorvat/IGraphR

Szabolcs

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]