[datatable-help] fread (sep2) on data with a comma as decimal delimiter
ravi
rv15i at yahoo.se
Tue Apr 30 20:38:51 CEST 2013
Hi,
I have a huge excel file that I have converted to a tab delimited
file. The numerical data have a comma as a decimal delimiter. I made a
compressed version of the file by just taking the first 100 rows. On
this, I have confirmed that the following command works fine :
df<-read.table(file=file1,header=TRUE,sep="\t",dec=",",encoding="latin1")
The following data.table also appears to work OK :
dt<-fread(file1,sep="\t")
But
the numerical data end up as characters. I would like to have help with
the most efficient method of converting these into numeric class. I
note that sep2 has not been implemented yet. Is there any workaround?
Can I specify the encoding also?
Would appreciate any help that I can get.
Thanks,
Ravi
More information about the datatable-help
mailing list