[R] How to see how a function is written

Sergey Goriatchev sergeyg at gmail.com
Tue Jun 15 14:38:08 CEST 2010


Erik, I see the following when I type "apply" at the prompt:

> apply
standardGeneric for "apply" defined from package "base"

function (X, MARGIN, FUN, ...)
standardGeneric("apply")
<environment: 0x03cad7d0>
Methods may be defined for arguments: X, MARGIN, FUN
Use  showMethods("apply")  for currently available ones.

Also, whether I type "mean" at the prompt, or I type "edit(mean)", I
do not see the underlying code for function "mean". How would I be
able to see it?

---
My machine:
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          10.1
year           2009
month          12
day            14
svn rev        50720
language       R
version.string R version 2.10.1 (2009-12-14)







On Tue, Jun 15, 2010 at 14:26, Erik Iverson <eriki at ccbr.umn.edu> wrote:
> Sergey Goriatchev wrote:
>>
>> Hello,
>>
>> If I want to see how, say, apply function is written, how would I be
>> able to do that?
>> Just typing "apply" at the prompt does not work.
>>
>
> Well, it is supposed to work, and it works for me.  So you need to tell us
> what "does not work" means, and all the info the posting guide requests, OS,
> versions, etc.
>



-- 
Famous Oxymorons:

Jobless Recovery
Jumbo Shrimp
War Game
Wedding Party
Genuine Replica
Toxic Assets
Italian Government
Feminine Logic
Amicable Divorce
Military Intelligence
Money Multiplier
Fiscal Conservative
Abundant Poverty
Educated Investor
Government Worker
Green Shoots
Hope and Change
Change you can believe in
Becky Quick



More information about the R-help mailing list