Uwe Ligges actually had a nice write-up on finding source code for functions
like this in R-news a couple of years ago.  You can find it here:
http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf (see p44)

There are some other tips for finding R source code here:

http://blog.revolution-computing.com/2009/02/finding-the-source.html

# David Smith

On Thu, Feb 5, 2009 at 2:10 PM, Dieter Menne
<dieter.menne@menne-biomed.de>wrote:

> 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
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
David M Smith <david@revolution-computing.com>
Director of Community, REvolution Computing www.revolution-computing.com
Tel: +1 (206) 577-4778 x3203 (Seattle, USA)

	[[alternative HTML version deleted]]


