[Rd] stringsAsFactors = FALSE

2008-11-17 Thread hadley wickham
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 -

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread Prof Brian Ripley
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,

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread William Dunlap
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

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread Prof Brian Ripley
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

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread hadley wickham
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

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread hadley wickham
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:

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread Peter Dalgaard
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

Re: [Rd] stringsAsFactors = FALSE

2008-11-17 Thread Martin Maechler
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