require(graphics)
## Assuming the methods for plot
## are set up as in the example of help(setMethod),
## print (without definitions) the methods that involve class "track":
showMethods("plot", classes = "track")
## Not run: ------------------------------------
# # Function "plot":
# # x = ANY, y = track
# # x = track, y = missing
# # x = track, y = ANY
#
# require("Matrix")
# showMethods("%*%")# many!
# methods(class = "Matrix")# nothing
# showMethods(class = "Matrix")# everything
# showMethods(Matrix:::isDiagonal) # a non-exported generic
## ---------------------------------------------<!-- %end{dontrun} -->
<!-- %% An example of showing methods from a loaded, -->
<!-- %% but not attached namespace. -->
if(no4 <- is.na(match("stats4", loadedNamespaces())))
loadNamespace("stats4")
showMethods(classes = "mle") # -> a method for show()
if(no4) unloadNamespace("stats4")
Run the code above in your browser using DataCamp Workspace