Re: [R] Accessing Element of a Table

2010-10-01 Thread Peter Ehlers
On 2010-10-01 7:43, Gundala Viswanath wrote: 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

[R] Accessing Element of a Table

2010-10-01 Thread Gundala Viswanath
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"]; -