permutation(spam)
permutation()所属R语言包:spam
Permute a matrix
表,改变矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Row and/or column permutes a matrix.
行和/或列置换矩阵。
用法----------Usage----------
permutation.spam(A, P=NULL, Q=NULL, ind=FALSE, check=TRUE)
参数----------Arguments----------
参数:A
sparse matrix
稀疏矩阵
参数:P
vector giving the row permutation.
矢量行排列。
参数:Q
vector giving the column permutation.
矢量列排列。
参数:ind
are the indices given. See examples.
的指数。见的例子。
参数:check
Should rudimentary checks be performed.
最基本的检查。
Details
详细信息----------Details----------
If P and Q are permutation matrices, the result is PAQ. However, it is also possible to specify the indices and to perform in a very efficient way A[rowind, colind], see examples.
如果P和Q是置换矩阵,其结果是PAQ。然而,它也有可能指定指数和A[rowind, colind],请参见实施例在一个非常有效的方式来执行。
A row permutation is much faster than a colum permutation. For very large matrices, a double transpose might be faster.
一排排列是速度远远超过一柱排列。对于非常大的矩阵,双转置可能会更快。
The spam option checkpivot determines if the permutation is verified.
垃圾邮件选项“checkpivot确定如果置换的验证。
值----------Value----------
A permuted matrix.
置换矩阵。
(作者)----------Author(s)----------
Reinhard Furrer
参见----------See Also----------
ordering, spam.options.
ordering,spam.options。
实例----------Examples----------
A <- spam(1:12,3)
P <- c(3,1,2)
Q <- c(2,3,1,4)
permutation(A,P,Q)-A[order(P),order(Q)]
permutation(A,P,Q,ind=TRUE)-A[P,Q]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|