lower.tri(spam)
lower.tri()所属R语言包:spam
Lower and Upper Triangular Part of a Sparse Matrix
下和上三角部分的稀疏矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Returns the lower or upper triangular structure or entries of a sparse matrix.
返回的下部或上部三角形结构或一个稀疏矩阵的条目。
用法----------Usage----------
lower.tri(x, diag = FALSE)
upper.tri(x, diag = FALSE)
参数----------Arguments----------
参数:x
a sparse matrix of class spam
一个稀疏矩阵类spam
参数:diag
logical. Should the diagonal be included?
逻辑。如果对角线列入?
Details
详细信息----------Details----------
Often not only the structure of the matrix is required but the entries as well. For compatibility, the default is only a structure consisting of ones (representing TRUEs). Setting the flag spam.getOption( "trivalues") to TRUE, the function returns the actual values.
常常不仅是矩阵的结构是必需的,但条目,以及。为了兼容性,默认是只有一个的的(相当于TRUE的)的结构组成。设置标志spam.getOption( "trivalues")到TRUE,该函数返回的实际值。
参见----------See Also----------
spam.options and diag
spam.options和diag
实例----------Examples----------
smat <- spam( c( 1,2,0,3,0,0,0,4,5),3)
upper.tri( smat)
upper.tri( smat, diag=TRUE)
spam.options( trivalues=TRUE)
upper.tri( smat)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|