Question

I know that R is statistical pkg, but probably there is library to work with graphs and find shortest path btw 2 nodes.

PS actually, I've found igraph and e1071, which one is better? Thank you

Was it helpful?

Solution

Sure, there's a Task View that gathers a fair number of the graph-related Packages. (The page linked to is a CRAN portal, which uses iframes, so i can't directly link to the Graph Task View. So from the page linked to here, click on Task Views near the top of the LHS column, then click on the Task View gR, near the bottom of the list.

Among the Packages there, igraph, for instance, has graph-theoretic functions such as you have mentioned in your Q.

igraph versus e1071--well, igraph is coded in C; it's very fast. I have not compared it with e1071 though.

What i do know is that these two packages differ a great deal in scope: e1071 is a collection of functions (at least originally) for a University course (i believe the unusual name 'e1071' refers to the course identifier), while. e1071 indeed contains a graph theoretic functions, but the majority of the Package's functions are directed to machine learning.

iGraph on the other hand is a dedicated graph theoretic Package. iGraph has many more dedicated functions, as well as constructors for a number of common graph types.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top