Re: [R] easy way to find all extractor functions and the datatypes of what they return

2009-10-10 Thread David Winsemius
Building on the two prior suggestions ( str() and methods() ) you could write a function to get both the named components of an object and the functions that work on its class. Using the example lm.D9 in the help page for lm: get_mths_str <- function(obj) c(functs = list(methods(class=cl

Re: [R] easy way to find all extractor functions and the datatypes of what they return

2009-10-10 Thread Gabor Grothendieck
Try this (where "lm" is the class of the lm output): > methods(class = "lm") [1] add1.lm* alias.lm* anova.lm case.names.lm* [5] confint.lm*cooks.distance.lm* deviance.lm* dfbeta.lm* [9] dfbetas.lm*drop1.lm* dummy.coef.lm* effects.l

Re: [R] easy way to find all extractor functions and the datatypes of what they return

2009-10-10 Thread Peter Ehlers
Robert Wilkins wrote: Am I asking for too much: for any object that a stat proc returns ( y <- lm( y~x) , etc ) ) , is there a super convenient function like give_all_extractors( y ) that lists all extractor functions , the datatype returned , and a text descriptor field ("pairwisepval" "lsmea

[R] easy way to find all extractor functions and the datatypes of what they return

2009-10-10 Thread Robert Wilkins
Am I asking for too much: for any object that a stat proc returns ( y <- lm( y~x) , etc ) ) , is there a super convenient function like give_all_extractors( y ) that lists all extractor functions , the datatype returned , and a text descriptor field ("pairwisepval" "lsmean" etc) That would just b