Re: [R] Accessing Vector of A Data Frame

2010-09-29 Thread jim holtman
Give us more information to work with. What does str(pred$posterior) show so that we can see the structure of the data. Is it a matrix, if so then you would do pred$posterior[, 'o'] On Wed, Sep 29, 2010 at 10:41 PM, Gundala Viswanath wrote: > I have a variable that looks like this: > >> prin

[R] Accessing Vector of A Data Frame

2010-09-29 Thread Gundala Viswanath
I have a variable that looks like this: > print(pred$posterior) ox 1 2.356964e-03 9.976430e-01 2 8.988153e-01 1.011847e-01 3 9.466137e-01 5.338627e-02 4 2.731429e-11 1.00e+00 Now what I want to do is to access "o" and "x" How come this approach fa