gvectorize(sna)
gvectorize()所属R语言包:sna
Vectorization of Adjacency Matrices
矢量化的邻接矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
gvectorize takes an input graph set and converts it into a corresponding number of vectors by row concatenation.
gvectorize设置接受一个输入图形,并把它转换成相应数目的向量按行串联。
用法----------Usage----------
gvectorize(mats, mode="digraph", diag=FALSE, censor.as.na=TRUE)
参数----------Arguments----------
参数:mats
one or more input graphs.
一个或多个输入图表。
参数:mode
“digraph” if data is taken to be directed, else “graph”.
如果数据被视为导演的“有向图”,否则为“图”。
参数:diag
boolean indicating whether diagonal entries (loops) are taken to contain meaningful data.
布尔值,指示是否对角元素(循环)包含有意义的数据。
参数:censor.as.na
if TRUE, code unused parts of the adjacency matrix as NAs prior to vectorizing; otherwise, unused parts are simply removed.
如果TRUE,未使用的部分代码的邻接矩阵NA“之前矢量;否则,未使用的部分简单地删除。
Details
详细信息----------Details----------
The output of gvectorize is a matrix in which each column corresponds to an input graph, and each row corresponds to an edge. The columns of the output matrix are formed by simple row-concatenation of the original adjacency matrices, possibly after removing cells which are not meaningful (if censor.as.na==FALSE). This is useful when preprocessing edge sets for use with glm or the like.
的输出gvectorize是一个矩阵,其中每一列对应于一个输入图形,每一行对应于一个边缘。输出矩阵的列是由简单的行级联的邻接矩阵后,可能去除单元,这是没有意义的(如果censor.as.na==FALSE“)。在预处理时的边缘设置使用glm或类似,这是非常有用的。
值----------Value----------
An nxk matrix, where n is the number of arcs and k is the number of graphs; if censor.as.na==FALSE, n will be reflect the relevant number of uncensored arcs.
脑血康矩阵,其中n是弧的数量和k是图的数量;,如果censor.as.na==FALSE,正将反映有关的一些未经审查的弧线。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
实例----------Examples----------
#Draw two random graphs[绘制两个随机图]
g<-rgraph(10,2)
#Examine the vectorized form of the adjacency structure[检查矢量形式的邻接结构]
gvectorize(g)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|