> -----Original Message-----
> Over the years, many people -- including some who I would 
> consider real expeRts -- have criticized factors and 
> advocated the use (sometimes exclusively) of character 
> vectors instead. 

Exclusive use of character vectors is not going to do the job.

The concept of a factor is fundamental to a lot of statistics; a programming 
environment that does not implement factors and their associated special 
behaviour is probably not a statistical programming language.

Special behaviours I have in mind include:
- Level order can be arbitrarily specified for display purposes
- A control level can be intentionally chosen for contrasts
- the option of "ordered" factors (for example, for polr and the like)

So I think the language does and will require a 'factor' type in one form or 
another.

 _When_ you decide to convert a character input to a factor is, of course, up 
to the user,and for cleanup it's very often better to stick with character 
early and convert to factor a bit later. But personally, I think that there is 
sufficient control over the coding of data to allow user discretion. and on the 
whole, it seems to me that character input gets used as factor data so much of 
the time when it is used at all that the default stringsAsFactors=TRUE setting 
seems the more sensible default.

S Ellison

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to