[R] See source code for survplot function in Design package

Dieter Menne dieter.menne at menne-biomed.de
Thu Feb 5 20:10:20 CET 2009


Eleni Rapsomaniki <e.rapsomaniki <at> mail.cryst.bbk.ac.uk> writes:

> I know one way to see the code for a hidden function, say function_x,  
> is using default.function_x (e.g. summary.default). But how can I see  
> the code for imported packages that have no namespace (in this case  
> Design)?

Just type the name without ()

library(Design)
Surv


For namespaces, you might also try 

getAnywhere(myfunctioname)

But note that what you see is the bare-bones codes, not the source.
To see comments, for example, better download the code from CRAN,
e.g. from:

http://cran.at.r-project.org/web/packages/abind/index.html


Dieter




More information about the R-help mailing list