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

R语言 sna包 ego.extract()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 10:50:41 | 显示全部楼层 |阅读模式
ego.extract(sna)
ego.extract()所属R语言包:sna

                                         Extract Egocentric Networks from Complete Network Data
                                         从完整的网络数据中提取自我中心网络

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

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

ego.extract takes one or more input graphs (dat) and returns a list containing the egocentric networks centered on vertices named in ego, using adjacency rule neighborhood to define inclusion.
ego.extract需要一个或多个输入图(dat),并返回一个列表,其中包含顶点命名ego集中在以自我为中心的网络,使用邻接规则邻里定义包含。


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


ego.extract(dat, ego = NULL, neighborhood = c("combined", "in",
    "out"))



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

参数:dat
one or more graphs.
一个或多个图形。


参数:ego
a vector of vertex IDs, or NULL if all are to be selected.
一个向量的顶点的ID,或NULL如果都被选中。


参数:neighborhood
the neighborhood to use.
附近使用。


Details

详细信息----------Details----------

The egocentric network (or “ego net”) of vertex v in graph G is defined as G[v U N(v)] (i.e., the subgraph of G induced by v and its neighborhood).  The neighborhood employed by ego.extract is selected by the eponymous argument: "in" selects in-neighbors, "out" selects out-neighbors, and "combined" selects all neighbors.  In the event that one of the vertices selected by ego has no qualifying neighbors, ego.extract will return a degenerate (1 by 1) adjacency matrix containing that individual's diagonal entry.
以自我为中心的网络(或“自我净额”)的顶点v在图G被定义为G[v U N(v)](即子的G诱导v和居委会)。附近采用ego.extract被选中的同名参数:"in"选择的邻居,"out"选择邻居,和"combined"选择所有邻居。在事件其中一个的顶点选择ego的有没有合格的邻居,ego.extract将返回一个堕落(1)邻接矩阵,个人的对角项。

Vertices within the returned matrices are maintained in their original order, save for ego (who is always listed first).  The ego nets themselves are returned in the order specified in the ego parameter (or their vertex order, if no value was specified).
在返回的矩阵顶点保持在原来的顺序,除自我(他总是首先列出)。本身的自我网ego参数(或他们的顶点顺序在指定的顺序返回,如果没有指定值)。

ego.extract is useful for finding local properties associated with particular vertices.  To compute functions of neighbors' covariates, see gapply.
ego.extract是用于当地寻找与特定顶点相关联的属性。邻居的协变量计算功能,请参阅gapply。


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

A list containing the adjacency matrices for the ego nets of each vertex in ego.
一个列表,其中包含的的自我网的每个顶点的邻接矩阵ego。


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


Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>



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

<h3>See Also</h3>

实例----------Examples----------


#Generate a sample network[生成的样本网络]
g<-rgraph(10,tp=1.5/9)

#Extract some ego nets[提取一些自我网]
g.in<-ego.extract(g,neighborhood="in")
g.out<-ego.extract(g,neighborhood="out")
g.comb<-ego.extract(g,neighborhood="in")

#View some networks[一些网络]
g.comb

#Compare ego net size with degree[比较自我净度的大小,]
all(sapply(g.in,NROW)==degree(g,cmode="indegree")+1)    #TRUE[TRUE]
all(sapply(g.out,NROW)==degree(g,cmode="outdegree")+1)  #TRUE[TRUE]
all(sapply(g.comb,NROW)==degree(g)/2+1)        #Usually FALSE![通常是错误的!]

#Calculate egocentric network density[计算以自我为中心的网络密度]
ego.size<-sapply(g.comb,NROW)
if(any(ego.size>2))
  sapply(g.comb[ego.size>2],function(x){gden(x[-1,-1])})

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-7 19:44 , Processed in 0.023735 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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