## Not run: ------------------------------------
# ## this example can be run if package XRPython from CRAN is installed.
# supers <- extends("PythonInterface")
# ## find all the superclasses from package XR
# fromXR <- sapply(supers,
# function(what) getClassDef(what)@package == "XR")
# ## print them
# supers[fromXR]
#
# ## find all the superclasses at distance 2
# superRelations <- extends("PythonInterface", fullInfo = TRUE)
# dist2 <- sapply(superRelations,
# function(what) is(what, "SClassExtension") && what@distance == 2)
# ## print them
# names(superRelations)[dist2]
#
## ---------------------------------------------
Run the code above in your browser using DataCamp Workspace