Skip to content
Prev 87168 / 398506 Next

converting character matrix to a dataframe

It is a bit more efficient to use as.data.frame in your apply.

You could make a copy of as.data.frame.matrix (under another name) and 
remove the special-casing of character matrices.  This would efficiently 
give you a data frame with character columns, but they would then not be 
treated 'AsIs' in subsequent manipulations.  So this is only desirable if 
efficiency is really important (and it seems unlikely to me that it is).
On Thu, 23 Feb 2006, John M. Miyamoto wrote: