设为首页收藏本站获取积分奖励

R语言中文网

 找回密码
 立即注册
查看: 1841|回复: 0

R语言矩阵as.matrix()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-20 23:00:37 | 显示全部楼层 |阅读模式
        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%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|R语言中文网    

GMT+8, 2024-6-3 15:01 , Processed in 0.027971 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表