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

R语言中文网

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

R语言返回对象的第一部分或最后一部分head()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-21 08:05:09 | 显示全部楼层 |阅读模式
        R语言返回对象的第一部分或最后一部分head()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:head()
R语言函数功能:返回对象的第一部分或最后一部分
来自资源库:基础库(R语言自带)
head()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

描述-----Description-----

Returns the first or last parts of a vector, matrix, table, data frame or function. Since head() and tail() are generic functions, they may also have been extended to other classes.
返回向量,矩阵,表,数据框或函数的第一部分或最后一部分。由于head()和tail()是通用函数,因此它们也可能已扩展到其他类。


使用方法-----Usage-----

head(x, ...)
## Default S3 methodefault S3 method:
默认的S3方法:

head(x, n = 6L, ...)
## S3 method for class 'matrix' S3 method for class 'matrix'
head(x, n = 6L, ...) # is exported as head.matrix()is exported as head.matrix()
导出为head.matrix()

## NB: The methods for 'data.frame' and 'array'  are identical to the 'matrix' oneNB: The methods for 'data.frame' and 'array' are identical to the 'matrix' one
注意:“ data.frame”和“ array”的方法与“ matrix”相同

## S3 method for class 'ftable' S3 method for class 'ftable'
head(x, n = 6L, ...)
## S3 method for class 'function' S3 method for class 'function'
head(x, n = 6L, ...)
tail(x, ...)
## Default S3 methodefault S3 method:
默认的S3方法:

tail(x, n = 6L, keepnums = FALSE, addrownums, ...)
## S3 method for class 'matrix' S3 method for class 'matrix'
tail(x, n = 6L, keepnums = TRUE, addrownums, ...) # exported as tail.matrix()exported as tail.matrix()
导出为tail.matrix()

## NB: The methods for 'data.frame', 'array', and 'table'NB: The methods for 'data.frame', 'array', and 'table'
注意:“ data.frame”,“ array”和“ table”的方法

##     are identical to the  'matrix'  oneare identical to the 'matrix' one
与“矩阵”相同

## S3 method for class 'ftable' S3 method for class 'ftable'
tail(x, n = 6L, keepnums = FALSE, addrownums, ...)
## S3 method for class 'function' S3 method for class 'function'
tail(x, n = 6L, ...)

参数-----Arguments-----

参数x介绍: an object
一个东西

参数n介绍: an integer vector of length up to dim(x) (or 1, for non-dimensioned objects). Values specify the indices to be selected in the corresponding dimension (or along the length) of the object. A positive value of n includes the first/last n indices in that dimension, while a negative value excludes the last/first abs(n), including all remaining indices. NA or non-specified values (when length(n) < length(dim(x))) select all indices in that dimension
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-20 23:12 , Processed in 0.026636 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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