[R] Accessing Element of a Table

Gundala Viswanath gundalav at gmail.com
Fri Oct 1 15:43:46 CEST 2010


I have the following structure:

> str(propn)
 table [1:2(1d)] 0.674 0.326
 - attr(*, "dimnames")=List of 1
  ..$ label: chr [1:2] "o" "x"


> print(propn)
label
        o         x
0.6738347 0.3261653


How can I access the value of "o" and "x"

I tried this but fail
> print(propn$label[,"o"];

- G.V.



More information about the R-help mailing list