找回密码
 注册
查看: 1464|回复: 0

R语言 Rgraphviz包 agopen()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-22 21:01:40 | 显示全部楼层 |阅读模式
agopen(Rgraphviz)
agopen()所属R语言包:Rgraphviz

                                        A function to obtain a libgraph object
                                         函数获得libgraph对象,

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function will read in a graph object and create a Ragraph object, returning it for use in other functions.  The graph represented by the Ragraph can be laidout in various formats.
此功能将读取graph对象,并创建一个Ragraph对象,返回它在使用其他功能。由Ragraph表示的图可以laidout在各种格式。


用法----------Usage----------


agopen(graph, name, nodes, edges, kind = NULL, layout = TRUE,
       layoutType=c("dot","neato","twopi","circo","fdp"),
       attrs=list(),
       nodeAttrs=list(), edgeAttrs=list(),
       subGList=list(), edgeMode=edgemode(graph),
       recipEdges=c("combined", "distinct"))



参数----------Arguments----------

参数:graph
An object of class graphNEL
一个对象的类graphNEL


参数:nodes
A list of pNode objects
pNode对象名单


参数:edges
A list of pEdge objects
pEdge对象名单


参数:name
The name of the graph
图的名称


参数:kind
The type of graph
图表类型


参数:layout
Whether to layout the graph or not
是否布局图或不


参数:layoutType
Defines the layout engine.  Defaults to dot
定义布局引擎。默认以点


参数:attrs
A list of graphviz attributes
graphviz的属性列表


参数:nodeAttrs
A list of specific node attributes
特定节点的属性列表


参数:edgeAttrs
A list of specific edge attributes
具体的边缘属性列表


参数:subGList
A list describing subgraphs for the graph parameter
描述子图图参数列表


参数:edgeMode
Whether the graph is directed or undirected
向或无向图


参数:recipEdges
How to handle reciprocated edges, defaults to combined
如何处理投桃报李的边缘,默认为combined


Details

详情----------Details----------

graph is from the package graph-class.
graph是从包graph-class。

The user can specify either the graph parameter and/or a combination of nodes and edges.  If either of the latter parameters are not specified then graph must be passed in, and is used in the functions buildNodeList and buildEdgeList (as appropriate - if nodes is passed in but edges is not, only buildEdgeList is called) which are default transformer functions to generate the pNode and pEdge lists for layout.
用户可以指定graph参数和/或组合nodes和edges。如果后者的参数都没有指定,那么graph必须通过,并在功能使用buildNodeList和buildEdgeList(如适用 - 如果nodes通过但edges没有,只有buildEdgeList被称为),这是默认的变压器功能生成pNode和pEdge布局名单。

The edgeMode argument specifies whether the graph is to be laid out with directed or undirected edges.  This parameter defaults to the edgemode of the graph argument - note that if graph was not passed in then edgeMode must be supplied.
edgeMode参数指定的图形是否是同向或无向边被解雇。此参数默认为的graph参数edgemode  - 如果graph没有通过edgeMode必须提供的说明。

The kind parameter works as follows:
那种参数的工作原理如下:




NULL: Determine the direction of the graph from the graph
空:确定从graph图的方向




AGRAPH: An undirected graph
AGRAPH:一个无向图




AGDIGRAPH: A directed graph
AGDIGRAPH:一个有向图




AGRAPHSTRICT: A strict undirected graph
AGRAPHSTRICT:严格的无向图




AGDIGRAPHSTRICT: A strict directed graph
AGDIGRAPHSTRICT:一个严格的指示图

Strict graphs do not allow self arcs or multi-edges.
严格的图形不允许自我弧或多边缘的。

If layout is set to TRUE, then the libgraph routines are used to compute the layout locations for the graph. Otherwise the graph is returned without layout information.
如果layout设置为TRUE,则libgraph例程用于计算图的布局位置。否则,返回图没有布局信息。

The subGList parameter is a list describing any subgraphs, where each element represents a subgraph and is itself a list with up to three elements.  The first element, graph is required and contains the actual graph object for the subgraph.  The second element, cluster is a logical value indicating if this is a cluster or a subgraph (a value of TRUE indicates a cluster, which is also the default value if this element is not specified).  In Graphviz, subgraphs are more of an organizational mechanism, whereas clusters are laid out separately from the main graph and then later inserted.  The last element of the list, attrs is used if there are any attributes for this subgraph. This is a named vector where the names are the attributes and the elements are the values for those attributes.
subGList参数是一个列表,说明任何子图,其中每个元素代表一个子图,本身就是一个具有三个要素列表。第一个元素,graph是必需的,包含实际的graph为子对象。第二个元素,cluster表示,如果这是一个cluster或subgraph(的TRUE价值的表示集群,这也是默认值,如果是一个逻辑值此元素没有指定)。在Graphviz的子图是一个组织的机制,而集群奠定了分别从主图和后来插入。列表的最后一个元素,attrs使用此子,如果有任何属性。这是一个命名为向量的名称的属性和元素是这些属性的值。

For a description of attrs, nodeAttrs and edgeAttrs, see the Ragraph man page.
描述了attrs,nodeAttrs和edgeAttrs,人Ragraph页。

The recipEdges argument can be used to specify how to handle reciprocal edges.  The default value, combined will combine any reciprocated edges into a single edge (and if the graph is directed, will by default place an arrowhead on both ends of the edge), while the other option is distinct which will draw to separate edges.  Note that in the case of an undirected graph, every edge of a graphNEL is going to be reciprocal due to implementation issues.
recipEdges参数可用于指定如何处理相互边缘。默认值,combined将合并成一个单一的边缘任何往复边缘(图指示,如果将默认位置上的边缘两端的箭头),而其他选项是distinct这将绘制单独的边缘。注意:在一个无向图的情况下,每graphNEL优势要因执行问题是相互的。


值----------Value----------

An object of class Ragraph
一个对象的类Ragraph


作者(S)----------Author(s)----------


Jeff Gentry



参考文献----------References----------

<h3>See Also</h3>  <code>graphLayout</code>,

举例----------Examples----------


set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
z <- agopen(g1,name="foo")
z
z <- agopen(g1,name="foo",layoutType="neato")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-4-21 20:26 , Processed in 0.026422 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表