Re: [R] Data Import to R

2014-11-14 Thread Jeff Newmiller
If your data uses a special marker such as "--" or "n/a" to indicate not available then once you have identified those markers (using any method, though Don's procedure below is what I use) then you can specify them with the na.strings parameter to read.csv. (See the help for read.table for many

Re: [R] Data Import to R

2014-11-14 Thread MacQueen, Don
.@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf Of Ramesh Gautam >> Sent: Friday, November 14, 2014 1:28 AM >> To: r-help@r-project.org >> Subject: [R] Data Import to R >> >> While importing .csv files into R, all data are converted to factor-by

Re: [R] Data Import to R

2014-11-14 Thread theo
i think you can set: options(stringsAsFactor=FALSE) which will apply globally or use read.csv(..., stringsAsFactor=FALSE) when imporing. have a look at the documentation ?read.csv good luck. On 11/14/2014 09:44 AM, David Winsemius wrote: > > On Nov 13, 2014, at 4:28 PM, Ramesh Gautam wrote: > >

Re: [R] Data Import to R

2014-11-13 Thread PIKAL Petr
t.org] On Behalf Of Ramesh Gautam > Sent: Friday, November 14, 2014 1:28 AM > To: r-help@r-project.org > Subject: [R] Data Import to R > > While importing .csv files into R, all data are converted to factor-by > default. But, how can I preserve the original format of the dat

Re: [R] Data Import to R

2014-11-13 Thread David Winsemius
On Nov 13, 2014, at 4:28 PM, Ramesh Gautam wrote: > While importing .csv files into R, all data are converted to factor-by > default. But, how can I preserve the original format of the data like > numeric to numeric, integer to integer, character to character etc while > importing from csv to R e

[R] Data Import to R

2014-11-13 Thread Ramesh Gautam
While importing .csv files into R, all data are converted to factor-by default. But, how can I preserve the original format of the data like numeric to numeric, integer to integer, character to character etc while importing from csv to R environment. I tried several ways, no thing helps. I used 's