Re: [R] iconv question: SQL Server 2005 to R

2013-10-11 Thread Ira Sharenow
Success! Thanks to everyone who helped. I needed to have the right file encoding parameter when using read.table(). test08 = read.table("test.csv", sep = ",", header = TRUE, stringsAsFactors = FALSE, fileEncoding = "UCS-2") Upon further research: http://technet.microsoft.com/en-us/library/bb3

Re: [R] iconv question: SQL Server 2005 to R

2013-10-11 Thread Milan Bouchet-Valat
Le jeudi 10 octobre 2013 à 21:45 -0700, Ira Sharenow a écrit : > Thanks for the suggestion. From R version 3.0.2, I tried > > > > > testDF7 = iconv(x = test07 , from = "UCS-2", to = "") > > > Encoding(testDF7) > > [1] "unknown" > > > > > testDF7[1:6] > > [1] NA NA NA NA NA NA > > >

Re: [R] iconv question: SQL Server 2005 to R

2013-10-10 Thread Ira Sharenow
Thanks for the suggestion. From R version 3.0.2, I tried > testDF7 =iconv(x = test07 , from = "UCS-2", to = "") > Encoding(testDF7) [1] "unknown" > testDF7[1:6] [1] NA NA NA NA NA NA So using "UCS-2" produced the same results as before. I do not think there are any NA values. I cleaned up t

Re: [R] iconv question: SQL Server 2005 to R

2013-10-09 Thread Prof Brian Ripley
On 09/10/2013 10:37, Milan Bouchet-Valat wrote: Le mardi 08 octobre 2013 à 16:02 -0700, Ira Sharenow a écrit : A colleague is sending me quite a few files that have been saved with MS SQL Server 2005. I am using R 2.15.1 on Windows 7. I am trying to read in the files using standard techniques.

Re: [R] iconv question: SQL Server 2005 to R

2013-10-09 Thread Ira Sharenow
Thanks for everyone’s feedback. It may be that the person who is using SQL Server 2005 is doing something that is not helpful. In the data there are supposed to be 10 columns with headers. The first column is a date time that I was reading in as a string. The second is a string. The rest are

Re: [R] iconv question: SQL Server 2005 to R

2013-10-09 Thread Milan Bouchet-Valat
Le mardi 08 octobre 2013 à 16:02 -0700, Ira Sharenow a écrit : > A colleague is sending me quite a few files that have been saved with MS > SQL Server 2005. I am using R 2.15.1 on Windows 7. > > I am trying to read in the files using standard techniques. Although the > file has a csv extension w

Re: [R] iconv question: SQL Server 2005 to R

2013-10-09 Thread Prof Brian Ripley
'Unicode' is a not an encoding. As the help says fileEncoding: character string: if non-empty declares the encoding used on a file (not a connection) so the character data can be re-encoded. See the ‘Encoding’ section of the help for ‘file’, the ‘R Data Import/Expo

[R] iconv question: SQL Server 2005 to R

2013-10-08 Thread Ira Sharenow
A colleague is sending me quite a few files that have been saved with MS SQL Server 2005. I am using R 2.15.1 on Windows 7. I am trying to read in the files using standard techniques. Although the file has a csv extension when I go to Excel or WordPad and do SAVE AS I see that it is Unicode Tex