Xtrct-methods(Matrix)
Xtrct-methods()所属R语言包:Matrix
Methods for "[": Extraction or Subsetting in Package 'Matrix'
“[”:提取或包矩阵子集的方法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Methods for "[", i.e., extraction or subsetting mostly of matrices, in package Matrix.
包"["Matrix即提取或大多矩阵子集,方法。
方法----------Methods----------
There are more than these:
有不止这些:
x = "Matrix", i = "missing", j = "missing", drop= "ANY" ...
x =“黑客帝国”,我“失踪”,J =“失踪”,降“任何”...
x = "Matrix", i = "numeric", j = "missing", drop= "missing" ...
x =“黑客帝国”,我=“数字”,J =“失踪”,降“失踪”...
x = "Matrix", i = "missing", j = "numeric", drop= "missing" ...
x =“黑客帝国”,I =“失踪”,J =“数字”,滴=“失踪”...
x = "dsparseMatrix", i = "missing", j = "numeric", drop= "logical" ...
x =“dsparseMatrix”,I =“失踪”,J =“数字”,降“逻辑”......
x = "dsparseMatrix", i = "numeric", j = "missing", drop= "logical" ...
x =“dsparseMatrix”,我=“数字”,J =“失踪”,降“逻辑”......
x = "dsparseMatrix", i = "numeric", j = "numeric", drop= "logical" ...
x =“dsparseMatrix”,我=“数字”,J =“数字”,降“逻辑”......
参见----------See Also----------
[<–methods for subassignment to "Matrix" objects. Extract about the standard extraction.
[<–methods:subassignment"Matrix"对象。 Extract的标准提取。
举例----------Examples----------
str(m <- Matrix(round(rnorm(7*4),2), nrow = 7))
stopifnot(identical(m, m[]))
m[2, 3] # simple number[简单的数字]
m[2, 3:4] # simple numeric of length 2[简单的数字长度为2]
m[2, 3:4, drop=FALSE] # sub matrix of class 'dgeMatrix'[子矩阵类的dgeMatrix“]
## rows or columns only:[#行或列:]
m[1,] # first row, as simple numeric vector[第一行,简单的数字向量]
m[,1:2] # sub matrix of first two columns[前两列的子矩阵]
showMethods("[", inherited = FALSE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|