silly, extracting the value of "C" from the results of somers2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

silly, extracting the value of "C" from the results of somers2

ahimsa campos-arceiz
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?

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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: silly, extracting the value of "C" from the results of somers2

P Ehlers


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
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html