[R] implementation of t.test

Charles C. Berry cberry at tajo.ucsd.edu
Tue Dec 12 02:06:01 CET 2006


On Mon, 11 Dec 2006, Weiwei Shi wrote:

> Hi, there:
>
> for some reason, I need to look at t.test at coding level. Can anyone
> here suggest a place to start with?

You mean how to read the code??

Like this:

> t.test # print the function
function (x, ...)
UseMethod("t.test")
<environment: namespace:stats>
> # that told me 't.test' has S3 methods
> methods(t.test)
[1] t.test.default* t.test.formula*

    Non-visible functions are asterisked
> # that told me what they were
> # and that I need ':::' to see them
> page(stats:::t.test.default,"print")
> page(stats:::t.test.formula,"print")
> # looks like you want to study t.test.default

see
 	?methods
 	?":::"

HTH

> [...]

Charles C. Berry                        (858) 534-2098
                                          Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	         UC San Diego
http://biostat.ucsd.edu/~cberry/         La Jolla, San Diego 92093-0717




More information about the R-help mailing list