有没有R包图(最短路径等)? [英] Are there any R Packages for Graphs (shortest path, etc.)?

查看:132
本文介绍了有没有R包图(最短路径等)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道R是统计pkg,但是可能有图书馆可以使用图表并找到最短路径btw 2个节点。



其实,我发现igraph和e1071,哪一个更好?
Thank you

解决方案

当然,有一个任务视图,它收集了大量与图形相关的软件包。 (链接到的页面是一个CRAN门户,它使用iframe,所以我不能直接链接到图形任务视图。因此,从链接到此处的页面,单击顶部附近的任务视图点击LHS列,然后点击列表底部附近的任务视图 gR 那里的软件包, igraph ,具有图论如你在Q中提到的功能。



igraph与e1071 - 好吧,igraph用C编码;速度非常快,我还没有和e1071做比较。



我知道的是这两个软件包在范围上有很大不同:e1071是大学课程中的一组函数(至少原来是这样)不寻常的名字'e1071'指的是课程标识符),而e1071确实包含了一个图论的函数,但是Package的大部分函数ons被引导到机器学习。另一方面,iGraph是一个专用的图形理论包。 iGraph有许多专用功能,以及许多常用图形类型的构造函数。


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

解决方案

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.

这篇关于有没有R包图(最短路径等)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆