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
.@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
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:
>
>
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
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
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
6 matches
Mail list logo