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

2010-10-05 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 remain

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 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

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

2010-10-05 Thread David Winsemius
ifferently, analogously to write.table. However, there does not even seem to be an option to make read.table behave analogously. ----- Original Message ---- From: peter dalgaard To: james hirschorn Cc: r-help@r-project.org Sent: Tue, October 5, 2010 7:25:52 AM Subject: Re: [R] read columns of

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

2010-10-05 Thread james hirschorn
d columns differently, analogously to write.table. However, there does not even seem to be an option to make read.table behave analogously. - Original Message From: peter dalgaard To: james hirschorn Cc: r-help@r-project.org Sent: Tue, October 5, 2010 7:25:52 AM Subject: Re: [R

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 hirschor

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

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

[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 number