Skip to content
Prev 277655 / 398506 Next

Named rows in a table (data frame) read from a file

Don't use attach. I know it's tempting, but it's really not worth it in the long run.  (Cf. Genesis 3, ff.)

This works:

F1["a", "Price"]

Incidentally the reason yours didn't work is because the row names are part of F1, not Price so attach() doesn't carry them along. 

In short, row names good; attach bad. 

Michael
On Nov 16, 2011, at 7:11 PM, JulioSergio <juliosergio at gmail.com> wrote: