From murdoch.duncan at gmail.com  Tue Feb 12 20:19:51 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Tue, 12 Feb 2013 14:19:51 -0500
Subject: [Rd] Regression stars
In-Reply-To: <511A8E43.6080302@fhcrc.org>
References: <20130209184801.GD14037@laura>
	<CAC+N9BXeaBzBMGidTJbrBT_hjKM0fW5ey6EWBSBbVqk12LZXGQ@mail.gmail.com>
	<CAC+N9BVRxcWLtGwHGbBD=4=uAPSan4jEFYfOWsLLqV4FrSyLGA@mail.gmail.com>
	<51180503.1080605@gmail.com>
	<loom.20130212T145313-215@post.gmane.org>
	<511A4F98.50209@statistik.tu-dortmund.de>
	<511A6286.4040704@gmail.com>
	<02F28BE5-04D2-44A8-920D-6E957CCDC4C7@muxspace.com>
	<4BDA0169-2C89-488B-B891-50EE1E857DB7@gmail.com>
	<511A8E43.6080302@fhcrc.org>
Message-ID: <511A95D7.7060708@gmail.com>

On 12/02/2013 1:47 PM, Herv? Pag?s wrote:
> On 02/12/2013 08:20 AM, peter dalgaard wrote:
> >
> > On Feb 12, 2013, at 17:05 , Brian Lee Yung Rowe wrote:
> >
> >>
> >> I thought that the default was the way it was for performance reasons. For large data.frames or repeated applications, using factors should be faster for non-trivial strings.
> >
> > I think not. Historically, it's more like "In statistics we have two kinds of variables, numerical and categorical. OK, so we have the occasional truly character-type variables like name and address, let's handle those as a special case".
>
> <sarcasm>
>
> Since character vectors are sooooo bad and people use them where
> they should instead use a factor, I propose to go all the way and
> by adding the stringsAsFactors arg to character() too. That way
> people are put on the right track from the very start.
>
> </sarcasm>

I think you are misreading what Peter wrote.  He wasn't defending that 
point of view, he was describing it.
>
> No seriously, if my variable is categorical, it's already in a factor
> and that's how I pass it to data.frame(). But if I have it in a
> character vector, it's because that's how I want it. It's my choice.
> How could anybody ever think that having data.frame() alter his/her
> data is a good thing?
>
> Please *remove* the stringsAsFactors arg of data.frame() in R 3.0.
> You'll do a big favor to your user base.

That's a really bad suggestion -- it would break code for people who set 
stringsAsFactors=FALSE as well as those who rely on the current default 
behaviour.   We certainly won't do that.

Duncan Murdoch



[Rd] Regression stars
Duncan Murdoch