[R] looking into function body without package installation

Duncan Murdoch murdoch at stats.uwo.ca
Fri Mar 5 13:25:19 CET 2010


Olga Lyashevska wrote:
> Dear all,
>
> I was wondering if there is a way to explore a syntax of particular  
> function without package installation?
> I am trying to write my own functions, and I would like to see how  
> other people approached similar problems. If every time I have to  
> install/load package to be able to explore function syntax I end up  
> installing loads of packages I am never going to use.
>
> I have also tried to use package 'sos' which does provide a good  
> facility to find relevant information, but it seems it does not give  
> any info on function body.
>
>   

The source of CRAN packages is available to download from there.  
Sometimes the source gives better information than deparsed versions
of functions:  it shows all the functions in the order the author 
thought was sensible, it contains comments, etc.  But it won't save much 
time compared to installing and loading the package.

Duncan Murdoch



More information about the R-help mailing list