subClasses: All Subclasses of a Given S4 Class

View source: R/Class-hier-fn.R

subClassesR Documentation

All Subclasses of a Given S4 Class

Description

Retugn all subclasses of a given S4 class; either only the direct sub classes are also those “further away” (distance > 1).

Usage

subClasses(Cl, directOnly = TRUE, complete = TRUE, ...)

Arguments

Cl

a class representation or a class name (character).

directOnly

logical indicating if you direct subclasses are desired (or also the ones with distance > 1).

complete

logical,.. as in....

...

........

Value

a character vector of class names.

Author(s)

Martin Maechler

See Also

superClasses; Classes in general.

Examples

subClasses("graph") # -> the direct ones
subClasses("graph", directOnly = FALSE) # the same: has only direct subclasses
if(require("Matrix")) {
  print( subClasses("sparseMatrix") )
  print( subClasses("sparseMatrix", directOnly = FALSE) )# much more
}

classGraph documentation built on Aug. 22, 2023, 1:06 a.m.