cBind(Matrix)
cBind()所属R语言包:Matrix
Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2
递归上cbind2/rbind2建成cbind“和rbind”的版本
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The base functions cbind and rbind are defined for an arbitrary number of arguments and hence have the first formal argument .... For that reason, S4 methods cannot easily be defined for binding together matrices inheriting from Matrix.
基地功能cbind和rbind被定义为任意数量的参数,因此第一个正式的说法...。出于这个原因,S4方法不能很容易被定义为结合在一起矩阵从Matrix继承。
For that reason, cbind2 and rbind2 have been provided for binding together two matrices, and we have defined methods for these and the 'Matrix'-matrices.
出于这个原因,cbind2和rbind2已经结合在一起的两个矩阵,我们已经确定了这些'Matrix'-矩阵的方法。
As a substitute for S4-enabled versions of cbind and rbind, you can use cBind and rBind with identical syntax and semantic in order to bind together multiple matrices ("matrix" or "Matrix" and vectors.
作为替代S4功能版本cbind和rbind,您可以使用cBind和rBind具有相同的语法和语义以结合在一起,多个矩阵("matrix"或"Matrix"和向量。
用法----------Usage----------
cBind(..., deparse.level = 1)
rBind(..., deparse.level = 1)
参数----------Arguments----------
参数:...
matrix-like R objects to be bound together, see cbind and rbind.
矩阵如R被捆绑在一起的对象,看到cbind和rbind。
参数:deparse.level
integer determining under which circumstances column and row names are built from the actual arguments' "expression", see cbind.
整数,确定情况下的行和列的名字是从建立“实际参数”表达“,看到cbind。
Details
详情----------Details----------
The implementation of these is recursive, calling cbind2 or rbind2 respectively, where these have methods defined and so should dispatch appropriately.
实施这些是递归调用cbind2或rbind2分别在这些有定义的方法,所以应适当派遣。
值----------Value----------
typically a "matrix-like" object of a similar class as the first argument in ....
通常一个“矩阵样的对象,类似class作为...的第一个参数。
Note that sometimes by default, the result is a sparseMatrix if one of the arguments is (even in the case where this is not efficient). In other cases, the result is chosen to be sparse when there are more zero entries is than non-zero ones (as the default sparse in Matrix()).
需要注意的是,有时默认情况下,其结果是sparseMatrix如果一个参数是(即使这是效率不高的情况下)。在其他情况下,其结果是比非零的选择是稀疏时有更多的零项(默认为sparseMatrix())。
作者(S)----------Author(s)----------
Martin Maechler
参见----------See Also----------
cbind2, cbind, Methods.
cbind2,cbind,Methods。
举例----------Examples----------
(a <- matrix(c(2:1,1:2), 2,2))
cbind(0, rBind(a, 7)) # remains traditional matrix[仍然传统的矩阵]
D <- Diagonal(2)
cBind(4, a, D, -1, D, 0) # a sparse Matrix[稀疏矩阵]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|