permute(seriation)
permute()所属R语言包:seriation
Permute a dist object, a matrix, an array, a list, or a numeric vector
表,改变一个dist对象,矩阵,数组,列表,或一个数值向量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A method for permuting various classes including the observations in a dist object, the rows and columns of a matrix, and all dimensions of an array given a suitable ser_permutation object.
用于置换各种类别,包括一个dist对象的观测中,以矩阵的行和列,而所有尺寸给出的阵列的一个合适的ser_permutation对象的方法。
用法----------Usage----------
permute(x, order)
参数----------Arguments----------
参数:x
an object (a list, a numeric vector, a dist object, a matrix, an array or any other object which provides dim and standard subsetting with "[").
一个对象(矩阵,列表,一个数值向量,dist对象,数组或任何其他的对象提供了dim和标准的子集,用"["“)。
参数:order
an object of class ser_permutation which contains suitable permutation vectors for x.
一个对象类ser_permutation有适当的置换向量x。
Details
详细信息----------Details----------
The permutation vectors in ser_permutation are suitable if the number of permutation vectors matches the number of dimensions of x and if the length of each permutation vector has the same length as the corresponding dimension of x.
置换矢量在ser_permutation是合适的,如果置换向量的数目的数目相匹配的尺寸x和如果置换矢量的长度的每个具有相同的长度与相应的维度x 。
For 1-dimensional/1-mode data (list, vector, dist), order can also be a single permutation vector of class ser_permutation_vector or data which can be automatically coerced to this class (e.g. a numeric vector).
对于1-dimensional/1-mode数据(列表,矢量,dist)order也可以是一个单一的置换矢量类ser_permutation_vector或数据可以自动转换到这个类(例如,一个数值向量)。
参见----------See Also----------
ser_permutation, dist in package stats.
ser_permutation,dist在包stats。
实例----------Examples----------
m <- matrix(rnorm(10), 5, 2)
m
permute(m, ser_permutation(5:1, 2:1))
d <- dist(m)
d
permute(d, ser_permutation(c(3,2,1,4,5)))
## this also works for 1-mode data:[#1模式下的数据,这也适用于:]
# permute(d, ser_permutation_vector(c(3,2,1,4,5)))[置位(D,ser_permutation_vector(C(3,2,1,4,5)))]
# permute(d, c(3,2,1,4,5))[置位(D,C(3,2,1,4,5))]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|