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

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

[复制链接]
发表于 2012-2-25 21:04:39 | 显示全部楼层 |阅读模式
addNode(graph)
addNode()所属R语言包:graph

                                         addNode
                                         addnode的

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

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

Add one or more nodes to a graph.
将一个或多个节点添加一个图形。


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


addNode(node, object, edges)



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

参数:node
A character vector of node names.  
特征向量的节点名称。


参数:object
A graph  
一个graph


参数:edges
A named list of edges.  
边一个命名列表。


Details

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

The supplied nodes are added to the set of nodes of the object.
所提供的nodeS被添加到一套object节点。

If edges are provided then their must be the same number as there are nodes and the must be in the same order. The elements of the edges list are vectors. They can be character vectors of node labels for nodes in object and if so then they are added with unit weights. If the vector is numeric then it must be named (with labels corresponding to nodes in the object) and the values are taken to be the edge weights.
如果edges提供,那么他们必须是相同的号码,作为有node的,必须以相同的顺序。 edges列表中的元素是向量。他们可以在节点节点标签的特征向量object如果是的话,他们正在与单位重量的增加。如果向量是数字,那么它必须被命名为(对应object节点与标签)和采取的是边权重值。

When the object is a distGraph then the edges must  be supplied and they must contain appropriate distances for all nodes  both those in object and those supplied.
当object是distGraph然后edges必须提供它们必须包含的所有节点都在object那些提供适当的距离。


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

A new graph of the same class as object with the supplied node added to the set of nodes.
同一类的一个新图object提供的节点添加到的节点集。


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


R. Gentleman



参见----------See Also----------

removeNode, removeEdge,
removeNode,removeEdge


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



  V <- LETTERS[1:4]
  edL1 <- vector("list", length=4)
  names(edL1) <- V
  for(i in 1:4)
     edL1[[i]] <- list(edges=c(2,1,4,3)[i], weights=sqrt(i))
  gR <- new("graphNEL", nodes=V, edgeL=edL1)
  gX <- addNode("X", gR)

set.seed(123)
g1 <- randomGraph(letters[1:10], 1:4, p=.3)
g2 <- addNode("z", g1, edges=list(c("a", "h", "g")))


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-6 17:55 , Processed in 0.031871 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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