[R] Converting matrix to data frame without losing an assigned dimname

Paul Miller pjmiller_57 at yahoo.com
Wed Apr 10 17:44:46 CEST 2013

Hi David, Gabor, Arun, and Rolf,
Thanks for your replies to my question. Very interesting and very helpful. I particularly liked the one-line solutions proposed by David and Gabor. I had a suspicion that this conversion could be done using only a minimal amount of code.
For what I'm doing, it's helpful to have a "State" column that is character. For that reason, David's solution might be the best in this particular instance.
Thanks again everyone.

More information about the R-help mailing list