subNetwork(BioNet)
subNetwork()所属R语言包:BioNet
Create a subGraph
创建一个子图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function creates a subgraph with the nodes given in the nodeList or for these nodes including their direct neighbors.
该函数创建一个子节点的NodeList或这些节点,包括其直接邻国。
用法----------Usage----------
subNetwork(nodeList, network, neighbors=c("none", "first"))
参数----------Arguments----------
参数:nodeList
Character vector of nodes, contained in the subgraph.
特征向量的节点,子图中。
参数:network
Graph that is used for subgraph extraction.
子提取使用的图形。
参数:neighbors
Neighborhood, that is chosen for the subgraph extraction. "none" are only the selected nodes, "first" includes the direct neighbors of the selected nodes.
邻居,选择子提取。 “无”,只有选定的节点,“第一”,包括选定的节点的直接邻国。
值----------Value----------
A graph object.
一个图形对象。
作者(S)----------Author(s)----------
Marcus Dittrich
举例----------Examples----------
library(igraph)
el <- cbind(c("a", "b", "c", "d", "e", "f", "d"), c("b", "c", "d", "e", "f", "a", "b"))
graph <- graph.edgelist(el, directed=TRUE)
node.list <- c("a", "b", "c")
graph2 <- subNetwork(nodeList=node.list, network=graph)
## Not run: par(mfrow=c(1,2));[#无法运行:面值(mfrow = C(1,2));]
plotModule(graph);
plotModule(graph2)
## End(Not run)[#结束(不运行)]
# or in graphNEL format: [或在graphNEL格式:]
graph3 <- igraph.to.graphNEL(graph)
graph4 <- subNetwork(nodeList=node.list, network=graph3)
graph3
graph4
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|