Skip to content

Extracting Element from S4 objects

2 messages · tbigdeli, David Winsemius

#
Good point, I've updated since.

Now, would solutions be specific to newer versions?  I need to make a
numerical comparison upon each iteration of independence_test().  With
chisq.test(), etc the output is as.list().  I imagine this difference is a
reflection of the author's coding preferences.

Now, I could code a Cochran-Armitage trend test but that wouldn't do our
great support community justice now, would it? :)
David Winsemius wrote:

  
    
#
On May 2, 2009, at 6:30 PM, tbigdeli wrote:

            
Who knows? I was just saying there might be difficulties in getting  
anyone to actually test the specifics of your question.
So you are probably referring to the coin package?
The output from what?
The code is available. After package(coin), methods(independence_test)  
reports three methods and  
getAnywhere(independence_test.IndependenceProblem) produces the code  
that does the dispatching to other specific methods. There are, of  
course, methods for extracting components of S4 objects. If you post  
the code that you are using, then people may have answers to questions  
which at the moment are highly non-specific.
Now that is a bit elliptical, isn't it? If you want to see how Agresti  
and Thompson might to it, consult page  81 of "R (and S-PLUS) Manual  
to Accompany Agresti?s Categorical Data Analysis (2002) 2nd edition"
Laura A. Thompson, 2007:
https://home.comcast.net/~lthompson221/Splusdiscrete2.pdf