[R] Problem to read non-standard csv file

Roberto rmoscetti at unitus.it
Fri Oct 12 18:45:35 CEST 2012


Hi all,
I have a problem to read csv file with comma as decimal. The numbers were
readed as strings.

I used the following string in R, but I do not understand why it does not
work.
tab <- read.csv2("Specimen_RawData_1.csv", header = TRUE, sep = ";", dec =
",", nrows = -1)

In addition, I copy/past into the post the link to the csv file generated by
my instrument.

https://dl.dropbox.com/u/95607996/Specimen_RawData_1.csv

The file is encoded in ANSI, I tried also the following string, but the
result was the same
tab <- read.csv2("Specimen_RawData_1.csv", header = TRUE, sep = ";", dec =
",", nrows = -1, encoding = "ANSI")

The possibility to open the file into a text editor and replace comma with
point is a crazy way, because I have around 1000 files to elaborate.
The only way for me is to use R.

I hope that someone can help me to find the issue.

Best,
Roberto




--
View this message in context: http://r.789695.n4.nabble.com/Problem-to-read-non-standard-csv-file-tp4646018.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list