selectSuperClasses(methods)
selectSuperClasses()所属R语言包:methods
Super Classes (of Specific Kinds) of a Class
一类的超类(特定类型)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Return superclasses of ClassDef, possibly only non-virtual or direct or simple ones.
返回ClassDef,可能只有非虚拟或直接或简单的父。
These functions are designed to be fast, and consequently only work with the contains slot of the corresponding class definitions.
这些功能设计要快,因此只使用contains相应的类定义的槽。
用法----------Usage----------
selectSuperClasses(Class, dropVirtual = FALSE, namesOnly = TRUE,
directOnly = TRUE, simpleOnly = directOnly,
where = topenv(parent.frame()))
.selectSuperClasses(ext, dropVirtual = FALSE, namesOnly = TRUE,
directOnly = TRUE, simpleOnly = directOnly)
参数----------Arguments----------
参数:Class
name of the class or (more efficiently) the class definition object (see getClass).
类或更有效地类定义对象的名称(见getClass)。
参数:dropVirtual
logical indicating if only non-virtual superclasses should be returned.
逻辑表明,如果只有非虚拟父应返还。
参数:namesOnly
logical indicating if only a vector names instead of a named list class-extensions should be returned.
逻辑表示如果只有矢量,而不是一个名为列表名称类的扩展,应退还。
参数:directOnly
logical indicating if only a direct super classes should be returned.
逻辑表明,如果只有一个直接超类应返回。
参数:simpleOnly
logical indicating if only simple class extensions should be returned.
逻辑表示,如果只是简单的类的扩展应该返回。
参数:where
(only used when Class is not a class definition) environment where the class definition of Class is found.
(仅用于当Class是不是类定义)环境类定义Class发现。
参数:ext
for .selectSuperClasses() only, a list of class extensions, typically getClassDef(..)@contains.
.selectSuperClasses(),list类的扩展,通常getClassDef(..)@contains。
值----------Value----------
a character vector (if namesOnly is true, as per default) or a list of class extensions (as the contains slot in the result of getClass).
character向量(如namesOnly是真实的,因为每个默认)或一类扩展列表(如在contains结果getClass插槽)。
注意----------Note----------
The typical user level function is selectSuperClasses() which calls .selectSuperClasses(); i.e., the latter should only be used for efficiency reasons by experienced useRs.
典型的用户级功能是selectSuperClasses()要求.selectSuperClasses()“,即,后者只应该由有经验的用户使用效率的原因。
参见----------See Also----------
is, getClass; further, the more technical class classRepresentation documentation.
is,getClass;进一步,更多的技术类classRepresentation文件。
举例----------Examples----------
setClass("Root")
setClass("Base", contains = "Root", representation(length = "integer"))
setClass("A", contains = "Base", representation(x = "numeric"))
setClass("B", contains = "Base", representation(y = "character"))
setClass("C", contains = c("A", "B"))
extends("C") #--> "C" "A" "B" "Base" "Root"[ - >“C”类“”B“的”基地“,”根“]
selectSuperClasses("C") # "A" "B"[“”,“B”]
selectSuperClasses("C", direct=FALSE) # "A" "B" "Base" "Root"[“”B“的”基地“,”根“]
selectSuperClasses("C", dropVirt = TRUE, direct=FALSE)# ditto w/o "Root"[同上W / O“根”]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|