Hi all,
I love the option to not automatically convert strings into factors,
but there are three places that the current option doesn't work where
I think it should:
options(stringsAsFactors = FALSE)
str(expand.grid(letters))
str(type.convert(letters))
df -
On Mon, 17 Nov 2008, hadley wickham wrote:
Hi all,
I love the option to not automatically convert strings into factors,
but there are three places that the current option doesn't work where
I think it should:
Perhaps you mean 'when I would like it to'? Things *should* work as
documented,
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of hadley wickham
Sent: Monday, November 17, 2008 5:10 AM
To: r-devel@r-project.org
Subject: [Rd] stringsAsFactors = FALSE
...
The key lines in
expand.grid would seem to be
if (!is.factor(x) is.character(x
On Mon, 17 Nov 2008, Prof Brian Ripley wrote:
On Mon, 17 Nov 2008, hadley wickham wrote:
Hi all,
I love the option to not automatically convert strings into factors,
but there are three places that the current option doesn't work where
I think it should:
Perhaps you mean 'when I would like
On Mon, Nov 17, 2008 at 11:06 AM, William Dunlap [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of hadley wickham
Sent: Monday, November 17, 2008 5:10 AM
To: r-devel@r-project.org
Subject: [Rd] stringsAsFactors = FALSE
...
The key lines in
expand.grid
On Mon, Nov 17, 2008 at 9:03 AM, Prof Brian Ripley
[EMAIL PROTECTED] wrote:
On Mon, 17 Nov 2008, hadley wickham wrote:
Hi all,
I love the option to not automatically convert strings into factors,
but there are three places that the current option doesn't work where
I think it should:
William Dunlap wrote:
but I'm not sure why they are being converted to factors in
the first place.
I think expand.grid converts input strings to factors so they
retain the order they have in the input.
Yep. These things do matter. Incidentally, I recently got burned by
cooking an example
WD == William Dunlap [EMAIL PROTECTED]
on Mon, 17 Nov 2008 09:06:49 -0800 writes:
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
hadley wickham Sent: Monday, November 17, 2008 5:10 AM
To: r-devel@r-project.org Subject: [Rd] stringsAsFactors
= FALSE