This happens in as.matrix(), which gets called by apply().
When you've got a mixed-mode dataframe like this, as.matrix() converts
everything to character. But, the rules it uses for each column don't
seem to be entirely consistent regarding whether columns are
space-padded to make each elemen
Well documented in ?as.matrix.
Ignore my previous post.
On Wed, 4 Nov 2009, Greg Snow wrote:
The apply function was meant to work on matrices and arrays, when you use it on
a data frame, the frame is first converted to a matrix. Since your data frame
has columns of different modes, the log
The apply function was meant to work on matrices and arrays, when you use it on
a data frame, the frame is first converted to a matrix. Since your data frame
has columns of different modes, the logical column is converted to character
and the matrix is of the single mode character. That is wha