R read.csv, adding a 1st column with unwanted text

I exported data from the result grid in SQL Server Management Studio to a csv file. The csv file looks correct.

But when I read the data in the R framework using read.csv, the first column name is added to " Γ― .. ". How to get rid of this unwanted text?

Example:

str(trainData)

'data.frame':   64169 obs. of  20 variables:    
 $ Γ―..Column1             : int  3232...   
 $ Column2                : int  4242...

The data looks something like this (nothing special):

Column1, Column2
100116577,100116577
100116698,100116702

+3
source share
1 answer

You have the Unicode UTF-8 specification at the beginning of the file:

http://en.wikipedia.org/wiki/Byte_order_mark

-, ISO-8859-1 CP1252 Γ― "ΒΏ

R Γ―, , - .

:

http://r.789695.n4.nabble.com/Writing-Unicode-Text-into-Text-File-from-R-in-Windows-td4684693.html

:

"UTF-8-BOM",

, read.csv fileEncoding="UTF-8-BOM" , SQL- .

, Γ―.. substr ( , , , )

+16

All Articles