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

R语言 hopach包 hdist-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 21:46:10 | 显示全部楼层 |阅读模式
hdist-class(hopach)
hdist-class()所属R语言包:hopach

                                        Class "hdist" - S4 class to hold distance matrices.
                                         类“hdist” - 中S4中的类来保存距离矩阵。

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

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

Class hdist was created to take advantage of the structure innate to symmetric  matrices.  It stores only the lower triangle of the matrix, thus reducing the size (and memory usage) from n x n to [n x (n - 1)] / 2.         
创建一流hdist采取对称矩阵结构的先天优势。它存储只下三角矩阵,从而减少从NXN [NX(N  -  1)] / 2大小(内存使用)。

Like a matrix, a hdist object is subsettable; thus, hdist[i,j] will  return the value at row 'i' column 'j'. Most valid indices for a matrix are also valid for a hdist object. (See examples below)
就像一个矩阵,hdist对象是subsettable,因此,hdist [I,J]将返回行我列J的价值。矩阵的最有效的指标也有效为hdist对象。 (参看下文)


插槽----------Slots----------

Object of class "numeric" a vector containing the stacked columns of the lower triangle of a symmetric matrix – often the symmetric matrix is a
Object类的"numeric"对称矩阵的下三角堆叠列 - 含矢量往往对称矩阵是一个




Size: Object of class "numeric" the dimension of the
Size类"numeric"维度:对象




Labels: Object of class "numeric" a list of values of
Labels类"numeric"值列表对象




Call: Object of class "character" a character string  specifying the method used to create the distance matrix
Call:对象类"character"一个字符串,指定用于创建距离矩阵的方法


方法----------Methods----------




hdist signature{Data = "numeric", Size = "numeric", Labels = "numeric", Call = "character"}: Create a new hdist object.
hdistsignature{Data = "numeric", Size = "numeric", Labels = "numeric", Call = "character"}:创建一个新hdist对象。




as.hdist signature{from = "matrix"}: Converts a matrix to a hdist object.
as.hdistsignature{from = "matrix"}:矩阵转换到hdist对象。




as.matrix signature(x = "hdist"): Converts a hdist object to a matrix.
as.matrixsignature(x = "hdist"):转换矩阵hdist对象,。




as.vector signature(x = "hdist", mode = "missing"): Returns the hdist object as a vector.
as.vectorsignature(x = "hdist", mode = "missing"):返回作为向量hdist对象的。




[ signature(x = "hdist"): Subsetting function for hdist objects. See examples and warning.
[signature(x = "hdist"):子集hdist对象的功能。看到的例子和警告。




coerce signature(from = "matrix", to = "hdist"): Converts a matrix to a hdist object.
要挟signature(from = "matrix", to = "hdist"):矩阵转换到hdist对象。




coerce signature(from = "hdist", to = "matrix"): Converts a hdist object to a matrix.
要挟signature(from = "hdist", to = "matrix"):转换矩阵hdist对象,。




dim signature(x = "hdist"): Returns the dimension of the hdist object if expanded to a square matrix.
昏暗的signature(x = "hdist"):返回的hdist对象的尺寸,如果扩大到一个方阵。




labels signature(object = "hdist"): Returns the labels used for printing.
标签signature(object = "hdist"):返回用于打印的标签。




length signature(x = "hdist"): Returns the number of rows in hdist object.
长度signature(x = "hdist"):返回在hdist对象的行数。




show signature(object = "hdist"): Prints the hdist object.
显示signature(object = "hdist"):打印hdist的对象。


警告----------Warning ----------

A hdist object is NOT closed under the subsetting operation. For instance, if a 100 x 100 symmetric matrix is stored as an hdist object, hdist[c(3,4,5),c(7,8,9)] will return a 3 x 3 matrix, since the subsetting will not result in a symmetric matrix. However, if index i = j, then subsetting a hdist object will result in a symmetric  matrix, and thus a hdist object will be returned.  (See examples below)
一个hdist对象下的子集的操作没有关闭。例如,如果一个100×100对称矩阵存储作为hdist对象,hdist [C(3,4,5),C(7,8,9)将返回一个3×3矩阵,因为子集不会导致在一个对称矩阵。不过,如果索引i = j时,则子集1 hdist对象将导致在一个对称矩阵,因此hdist对象将被退回。 (参看下文)


注意----------Note----------

Thank you to Larry Tai for his assistance creating run-time comparisons.
谢谢拉里帮助他创建的运行时间比较大。


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


Katherine S. Pollard <kpollard@gladstone.ucsf.edu> and Gregory D. Wall <gwall@wald.ucdavis.edu>



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







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

hopach
hopach


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


        showClass("hdist")

        library(hopach)
        X <- matrix(rnorm(60,mean=10,sd=2),nrow=10,ncol=6,byrow=TRUE)
        dmat <- disscosangle(X)
        dmat
        str(dmat)
       
        # Examples where subsetting a hdist object returns a matrix...        [示例子集1 hdist对象返回一个矩阵...]
        dmat[c(3,4,5),c(5,6,7,8)]
        dmat[c(TRUE,FALSE),c(FALSE,TRUE)]
        dmat[c(4,5,6), ]

        # Examples where subsetting a hdist object returns a hdist object...[示例子集1 hdist对象返回一个hdist的对象...]
        dmat[c(3,4,5,6,7),c(3,4,5,6,7)]
        dmat[c(TRUE,FALSE),c(TRUE,FALSE)]
       
        # Expand hdist object to a symmetric matrix...[对称矩阵展开hdist对象...]
        as.matrix(dmat)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-6 03:52 , Processed in 0.021770 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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