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

R语言中文网

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

R语言列出S3泛型函数或类的方法.S3methods()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-21 08:20:02 | 显示全部楼层 |阅读模式
        R语言列出S3泛型函数或类的方法.S3methods()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:.S3methods()
R语言函数功能:列出S3泛型函数或类的方法
来自资源库:基础库(R语言自带)
.S3methods()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

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

List all available methods for a S3 and S4 generic function, or all methods for an S3 or S4 class.
列出S3和S4泛型函数的所有可用方法,或S3或S4类的所有方法。


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

methods(generic.function, class)
.S3methods(generic.function, class, envir=parent.frame())
## S3 method for class 'MethodsFunction' S3 method for class 'MethodsFunction'
format(x, byclass = attr(x, "byclass"), ...)
## S3 method for class 'MethodsFunction' S3 method for class 'MethodsFunction'
print(x, byclass = attr(x, "byclass"), ...)

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

参数generic.function介绍: a generic function, or a character string naming a generic function.
通用函数,或命名通用函数的字符串。

参数class介绍: a symbol or character string naming a class: only used if generic.function is not supplied.
命名类的符号或字符串:仅当未提供generic.function时使用。

参数envir介绍: the environment in which to look for the definition of the generic function, when the generic function is passed as a character string.
当通用函数作为字符串传递时,在其中寻找通用函数定义的环境。

参数x介绍: typically the result of methods(..), an R object of S3 class "MethodsFunction", see Value below.
通常是methods(..)c(S3类"MethodsFunction"的R对象)的结果,请参见下面的Value。

参数byclass介绍: an optional logical allowing to override the "byclass" attribute determining how the result is printed, see Details .
可选logical,它允许覆盖"byclass"属性来确定如何打印结果,请参阅Details。

参数...介绍: potentially further arguments passed to and from methods; unused currently.
方法可能传递的其他参数;当前未使用。


详情-----Details-----

methods() finds S3 and S4 methods associated with either the generic.function or class argument. Methods are found in all packages on the current search() path. .S3methods() finds only S3 methods, .S4methods() finds only only S4 methods.
methods()查找与generic.function或class参数关联的S3和S4方法。方法可在当前search()路径上的
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-28 16:22 , Processed in 0.026840 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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