selectSuperClasses package:methods R Documentation _S_u_p_e_r _C_l_a_s_s_e_s (_o_f _S_p_e_c_i_f_i_c _K_i_n_d_s) _o_f _a _C_l_a_s_s _D_e_s_c_r_i_p_t_i_o_n: Return superclasses of 'ClassDef', possibly only non-virtual or direct or simple ones. These functions are designed to be fast, and consequently only work with the 'contains' slot of the corresponding class definitions. _U_s_a_g_e: selectSuperClasses(Class, dropVirtual = FALSE, namesOnly = TRUE, directOnly = TRUE, simpleOnly = directOnly, where = topenv(parent.frame())) .selectSuperClasses(ext, dropVirtual = FALSE, namesOnly = TRUE, directOnly = TRUE, simpleOnly = directOnly) _A_r_g_u_m_e_n_t_s: Class: name of the class or (more efficiently) the class definition object (see '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. ext: for '.selectSuperClasses()' only, a 'list' of class extensions, typically 'getClassDef(..)@contains'. _V_a_l_u_e: 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'). _N_o_t_e: The typical user level function is 'selectSuperClasses()' which calls '.selectSuperClasses()'; i.e., the latter should only be used for efficiency reasons by experienced useRs. _S_e_e _A_l_s_o: 'is', 'getClass'; further, the more technical class 'classRepresentation' documentation. _E_x_a_m_p_l_e_s: 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" selectSuperClasses("C") # "A" "B" selectSuperClasses("C", direct=FALSE) # "A" "B" "Base" "Root" selectSuperClasses("C", dropVirt = TRUE, direct=FALSE)# ditto w/o "Root"