SCM

SCM Repository

[matrix] Annotation of /pkg/tests/Class+Meth.R
ViewVC logotype

Annotation of /pkg/tests/Class+Meth.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 620 - (view) (download)

1 : maechler 620 library(Matrix)
2 :    
3 :     #### Automatically display the class inheritance structure
4 :     #### possibly augmented with methods
5 :    
6 :     allCl <- getClasses("package:Matrix")
7 :    
8 :     ## Really nice would be to construct an inheritance graph and display
9 :     ## it. The following is just a cheap first step.
10 :    
11 :     cat("All classes in the 'Matrix' package:\n")
12 :     for(cln in allCl) {
13 :     cat("\n-----\n\nClass", dQuote(cln),":\n ",
14 :     paste(rep("~",nchar(cln)),collapse=''),"\n")
15 :     ## A smarter version would use getClass() instead of showClass(),
16 :     ## build the "graph" and only then display.
17 :    
18 :     showClass(cln)
19 :     }
20 :    
21 :     cat("\n \n")
22 :    
23 :     ## One could extend the `display' by using (something smarter than)
24 :     ## are the "coerce" methods showing more than the 'Extends' output above?
25 :     cat("All (S4) methods in the 'Matrix' package:\n")
26 :     showMethods(where="package:Matrix")

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge