ahimsa campos arceiz
2006-Jan-04 06:10 UTC
[R] silly, extracting the value of "C" from the results of somers2
Sorry I have a very simple question: I used somers2 function from Design package:> z<- somers2(x,y, weights=w)results are:>zC Dxy n Missing 0.88 0.76 500 0.00 Now I want to call only the value of C to be used in further analyses, but I fail to do it. I have tried:> z$CNULL> z[,C]Error in z[,C]: incorrect number of dimensions and some other silly things. If I do>list(z)[[1]] C Dxy n Missing 0.88 0.76 500 0.00 Can somebody tell me how can I obtain just the value of c? Thank you useRs, very gratefull Ahimsa -- Ahimsa Campos Arceiz The University Museum, The University of Tokyo Hongo 7-3-1, Bunkyo-ku, Tokyo 113-0033 phone +81-(0)3-5841-2824
P Ehlers
2006-Jan-04 06:30 UTC
[R] silly, extracting the value of "C" from the results of somers2
ahimsa campos arceiz wrote:> Sorry I have a very simple question: > > I used somers2 function from Design package: > > >>z<- somers2(x,y, weights=w) > > > results are: > > >>z > > C Dxy n Missing > 0.88 0.76 500 0.00 > > Now I want to call only the value of C to be used in further analyses, but I > fail to do it. I have tried: > > >>z$C > > NULL > >>z[,C] > > Error in z[,C]: incorrect number of dimensions > > and some other silly things. If I do > >>list(z) > > [[1]] > C Dxy n Missing > 0.88 0.76 500 0.00 > > Can somebody tell me how can I obtain just the value of c?(I think that somers2() is in package:Hmisc.) The help page clearly says that somers2 returns a vector and there's an example on the help page that does _exactly_ what you ask! z["C"] or z[1] Peter Ehlers> > Thank you useRs, > > very gratefull > > Ahimsa >
Seemingly Similar Threads
- evaluation methods for logistic regression with proportion data
- reshaping data frame
- scaling y-axis to relative frequency in multiple histogram (multhist)
- fitting a lognormal distribution using cumulative probabilities
- how to apply the function cut( ) to many columns in a data.frame?