[R] Inspecting R functions

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Jan 3 12:05:10 CET 2005


Richard Dybowski wrote:

> In S-Plus, I can look at the structure of a function (for example, hist) 
> simply by entering
>         hist <RETURN>
> however, if I do this in R, I get the response
>         function (x, ...)
>         UseMethod("hist")
>         <environment: namespace:graphics>
> How can I inspect the structure of a function in R?

Well, if hist() would be a an S3 generic with methods in S-PLUS as well, 
  it would look quite similar like in R...

Type methods(hist) to see which methods do exists, in particular you 
want to get hist.default, I guess.

Uwe Ligges



> -------------------------------
> Richard Dybowski
> 143 Village Way
> Pinner HA5 5AA, UK
> Tel: 07976 250092
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list