Hello R People: Here's the Saturday night goofy question. I would like to see the code for TukeyHSD function and I tried the following:> getAnywhere("TukeyHSD")A single object matching ?TukeyHSD? was found It was found in the following places package:stats namespace:stats with value function (x, which, ordered = FALSE, conf.level = 0.95, ...) UseMethod("TukeyHSD") <bytecode: 0x0000000005d22f90> <environment: namespace:stats>> stats:::TukeyHSDfunction (x, which, ordered = FALSE, conf.level = 0.95, ...) UseMethod("TukeyHSD") <bytecode: 0x0000000005d22f90> <environment: namespace:stats>>I thought that the 3 colon would take care of matters. What am I missing, please? Thanks yet again, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
On Jan 12, 2013, at 9:54 PM, Erin Hodgess wrote:> Hello R People: > > Here's the Saturday night goofy question. I would like to see the > code for TukeyHSD function and I tried the following: > >> getAnywhere("TukeyHSD") > A single object matching ?TukeyHSD? was found > It was found in the following places > package:stats > namespace:stats > with value > > function (x, which, ordered = FALSE, conf.level = 0.95, ...) > UseMethod("TukeyHSD") > <bytecode: 0x0000000005d22f90> > <environment: namespace:stats> >> stats:::TukeyHSD > function (x, which, ordered = FALSE, conf.level = 0.95, ...) > UseMethod("TukeyHSD") > <bytecode: 0x0000000005d22f90> > <environment: namespace:stats> >> > > I thought that the 3 colon would take care of matters. What am I > missing, please?TukeyHSD is not the real function name. It's a generic function and you need to look at the code for whichever function of the possibly multiple TukeyHSD's you are interested in. ?methods methods(TukeyHSD) -- David Winsemius, MD Alameda, CA, USA
Hi Erin, What you're missing is that the TukeyHSD function is generic. There seems to be only one method for it, namely TukeyHSD.aov. Try typing: methods(TukeyHSD) On my system if I type TukeyHSD.aov I see a splendiferous amount of lovely --- and (mirabile dictu!) reasonably comprehensible-looking --- code. cheers, Rolf On 01/13/2013 06:54 PM, Erin Hodgess wrote:> Hello R People: > > Here's the Saturday night goofy question. I would like to see the > code for TukeyHSD function and I tried the following: > >> getAnywhere("TukeyHSD") > A single object matching ?TukeyHSD? was found > It was found in the following places > package:stats > namespace:stats > with value > > function (x, which, ordered = FALSE, conf.level = 0.95, ...) > UseMethod("TukeyHSD") > <bytecode: 0x0000000005d22f90> > <environment: namespace:stats> >> stats:::TukeyHSD > function (x, which, ordered = FALSE, conf.level = 0.95, ...) > UseMethod("TukeyHSD") > <bytecode: 0x0000000005d22f90> > <environment: namespace:stats> > I thought that the 3 colon would take care of matters. What am I > missing, please?