R语言矩阵as.matrix()函数-中英文对照帮助文档
By MicroRbt Martinez PhD
R语言函数名:as.matrix()
R语言函数功能:矩阵
来自资源库:基础库(R语言自带)
as.matrix()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。
描述-----Description-----
matrix creates a matrix from the given set of values.
matrix从给定的一组值创建一个矩阵。
as.matrix attempts to turn its argument into a matrix.
as.matrix尝试将其参数转换为矩阵。
is.matrix tests if its argument is a (strict) matrix.
is.matrix测试其参数是否为(严格)矩阵。
使用方法-----Usage-----
matrix(data = NA, nrow = 1, ncol = 1, byrow = FALSE,
dimnames = NULL)
as.matrix(x, ...)
## S3 method for class 'data.frame' S3 method for class 'data.frame'
as.matrix(x, rownames.force = NA, ...)
is.matrix(x)
参数-----Arguments-----
参数data介绍: an optional data vector (including a list or expression vector). Non-atomic classed R objects are coerced by as.vector and all attributes discarded.
可选数据向量(包括列表或expression向量)。非原子分类的R对象被as.vector强制,并且所有属性都将被丢弃。
参数nrow介绍: the desired number of rows.
所需的行数。
参数ncol介绍: the desired number of columns.
所需的列数。
参数byrow介绍: logical. If FALSE (the default) the matrix is filled by columns, otherwise the matrix is filled by rows.
符合逻辑如果为FALSE(默认值),则矩阵由列填充,否则矩阵由行填充。
参数dimnames介绍: A dimnames attribute for the matrix: NULL or a list of length 2 giving the row and column names respectively. An empty list is treated as NULL, and a list of length one as row names. The list can be named, and the list names will be used as names for the dimensions.
矩阵的dimnames属性:NULL或长度为2的list,分别提供行名和列名。空列表被视为NULL,长度为1的列表作为行名。可以命名列表,列表
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
|