之前学过一次igraph
这个R包,现在在利用贝叶斯网络从一个表达量的矩阵中得到因果关系时,发现了另外一套操作图的方式。也就是:
graph
--> RBGL
-->Rgraphviz
Table: The intro. of three packages
package name | description | interface |
---|---|---|
graph |
Provides the basic class definitions and functionality | / |
RBGL |
Provides an interface to graph algorithms (such as shortest path, connectivity etc) | the R interface to the Boost Graph Library |
Rgraphviz |
Provides rendering functionality | the R interface to the AT&T GraphViz plotting software |
下面记录这种操作图的方式的笔记:
graph package 要点记录
create the graph
- create the random graph by
randomEGraph()
- to see the graph properties:
?GraphvizAttributes()
for all properties;getDefaultAttrs()
will take a partial global attribute list - manipulate one graph(
connComp()
subGraph()
``) and between graphs(union, intersection and coercion) - some graph exploration algo.
Note the the subGraph is very useful to plot the layout cluster!
use Rgraphviz to rendering the graph
use new interface
可以按照Rgraphviz 官方文档进行学习,讲的非常的具体!
in order to make your work down
新式的grpah 绘制方式虽然比原来的方式要显得简单很多,但是在实际的使用中,新式的绘制方法很多功能在官方文档中讲的不是很具体,所以我们应该要两个文档结合着来看!