Re: [R] read columns of quoted numbers as factors

2010-10-06 Thread Peter Dalgaard
On 10/06/2010 02:41 AM, james hirschorn wrote: Yes, your solution of setting quote= would read the multi-word strings incorrectly. A more complicated version of your solution should work: First check which columns are identified as strings, and then apply your solution to the remaining

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread Bernardo Rangel Tura
On Mon, 2010-10-04 at 09:39 -0700, james hirschorn wrote: Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as 1, 2, 3, etc ... The default behavior of read.table is to convert these columns to integer vectors. Is there a way

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread peter dalgaard
On Oct 4, 2010, at 18:39 , james hirschorn wrote: Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as 1, 2, 3, etc ... The default behavior of read.table is to convert these columns to integer vectors. Is there a way to

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread Mike Marchywka
From: pda...@gmail.com Date: Tue, 5 Oct 2010 13:25:52 +0200 To: j_hirsch...@yahoo.com CC: r-help@r-project.org Subject: Re: [R] read columns of quoted numbers as factors On Oct 4, 2010, at 18:39 , james hirschorn wrote: Suppose I have a data

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread james hirschorn
columns of quoted numbers as factors On Oct 4, 2010, at 18:39 , james hirschorn wrote: Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as 1, 2, 3, etc ... The default behavior of read.table is to convert these columns to integer

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread David Winsemius
dalgaard pda...@gmail.com To: james hirschorn j_hirsch...@yahoo.com Cc: r-help@r-project.org Sent: Tue, October 5, 2010 7:25:52 AM Subject: Re: [R] read columns of quoted numbers as factors On Oct 4, 2010, at 18:39 , james hirschorn wrote: Suppose I have a data file (possibly with a huge number

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread Gabor Grothendieck
On Mon, Oct 4, 2010 at 12:39 PM, james hirschorn j_hirsch...@yahoo.com wrote: Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as 1, 2, 3, etc ... The default behavior of read.table is to convert these columns to integer vectors.

[R] read columns of quoted numbers as factors

2010-10-04 Thread james hirschorn
Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as 1, 2, 3, etc ... The default behavior of read.table is to convert these columns to integer vectors. Is there a way to get read.table to recognize that columns of quoted numbers