是否有用于图形的 R 包(最短路径等)?
我知道 R 是统计 pkg,但可能有库可以处理图形并找到 2 个节点之间的最短路径。
PS实际上,我找到了igraph和e1071,哪个更好? 谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当然,有一个任务视图,它收集了大量与图形相关的包。 (链接到的页面是一个 CRAN 门户,它使用 iframe,因此我无法直接链接到图形任务视图。因此,从链接到此处的页面中,单击靠近顶部的任务视图 LHS 列,然后单击列表底部附近的“任务视图”gR,
igraph 具有图论函数,如您在 Q.
igraph 与 e1071 中提到的那样 -好吧,igraph 是用 C 编写的;但我没有将其与 e1071 进行比较,但
我所知道的是,这两个包在范围上有很大不同:e1071 是一个函数的集合(至少最初是这样)。 iGraph 的大部分功能都是针对机器学习的。
大学课程(我相信不寻常的名称“e1071”指的是课程标识符),而 e1071 确实包含图论函数,但另一方面, 理论包。 iGraph 有更多专用函数以及许多常见图形类型的构造函数。
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.