[R] Beginner's question about t.test()
Pramote Khuwijitjaru
kmote at hotmail.com
Mon Feb 16 05:59:23 CET 2004
>From: Rolf Turner <rolf at math.unb.ca>
>To: kmote at hotmail.com
>CC: r-help at stat.math.ethz.ch
>Subject: Re: [R] Beginner's question about t.test()
>Date: Sun, 15 Feb 2004 11:23:26 -0400 (AST)
>
>(a) You don't really need/want to look at t.test.default; your own
>code --- to do t tests based on summary statistics rather than data
>--- will have little or nothing to do with the code in
>t.test.default. Just write code to do the t test ``as if you were
>doing it by hand'' which is very simple and straightforward.
>
>(b) The reason that you can't ``see'' the t.test.default code is the
>namespace business on which I recently wrote a perhaps ill-advised
>rant to this list.
>
>It was gently pointed out to me that the namespace idea certainly
>does have its uses and advantages. It was also pointed out that you
>CAN get at functions which are ``hidden away'' by the namespace
>mechanism. Three ways (of which I was kindly informed by Andy Liaw
>and Duncan Murdoch) are:
>
> > ctest:::t.test.default
> > getAnywhere("t.test.default")
> > getS3method("t.test","default")
>
>Hope this helps.
>
> cheers,
>
> Rolf Turner
> rolf at math.unb.ca
You are right, I really don't want to correct the function code because it
seems too complex for me to understand it right now. :)
Thanks for advice how to see the code.
Pramote
More information about the R-help
mailing list