Skip to content
Prev 34317 / 63424 Next

Characters vs. factors

On Mon, Oct 5, 2009 at 4:33 PM, hadley wickham <h.wickham at gmail.com> wrote:
A related issue is that modeling functions throw a warning when
character objects are used in place of factors:
Warning message:
In model.matrix.default(mt, mf, contrasts) :
  variable 'Payment' converted to a factor

The warning doesn't affect R's behaviour, of course, but it does make
it difficult to sanction the otherwise sensible advice to R beginners
to read in data files with as.it=TRUE. (The warning leads to
difficult-to-answer questions.) For similar reasons  I deleted the
warning from this post:
http://blog.revolution-computing.com/2009/09/is-the-express-line-really-faster-1.html

In general the trend towards equivalence of factors and character
vectors is welcome, though.

# David
On Mon, Oct 5, 2009 at 4:33 PM, hadley wickham <h.wickham at gmail.com> wrote:
--
David M Smith <david at revolution-computing.com>
Director of Community, REvolution Computing www.revolution-computing.com
Tel: +1 (206) 577-4778 x3203 (San Francisco, USA)

Check out our upcoming events schedule at www.revolution-computing.com/events