Re: [R] Umlaut read from csv-file

2008-11-09 Thread Heinz Tuechler
At 06:25 09.11.2008, Prof Brian Ripley wrote: On Sat, 8 Nov 2008, Heinz Tuechler wrote: At 08:01 08.11.2008, Prof Brian Ripley wrote: We have no idea what you understood (you didn't tell us), but the help says encoding: character vector. The encoding(s) to be assumed when 'file' is

Re: [R] Umlaut read from csv-file

2008-11-08 Thread Heinz Tuechler
At 08:01 08.11.2008, Prof Brian Ripley wrote: We have no idea what you understood (you didn't tell us), but the help says encoding: character vector. The encoding(s) to be assumed when 'file' is a character string: see 'file'. A possible value is 'unknown': see the

Re: [R] Umlaut read from csv-file

2008-11-08 Thread Prof Brian Ripley
On Sat, 8 Nov 2008, Heinz Tuechler wrote: At 08:01 08.11.2008, Prof Brian Ripley wrote: We have no idea what you understood (you didn't tell us), but the help says encoding: character vector. The encoding(s) to be assumed when 'file' is a character string: see 'file'. A possible

Re: [R] Umlaut read from csv-file

2008-11-07 Thread Peter Dalgaard
Heinz Tuechler wrote: Dear Prof.Ripley! Thank you very much for your attention. In the given example Encoding(), or the encoding parameter of read.csv solve the problem. I hope your patch will solve also the problem, when I read a spss file by spss.get(), since this function has no encoding

Re: [R] Umlaut read from csv-file

2008-11-07 Thread Heinz Tuechler
At 13:34 07.11.2008, Peter Dalgaard wrote: Heinz Tuechler wrote: Dear Prof.Ripley! Thank you very much for your attention. In the given example Encoding(), or the encoding parameter of read.csv solve the problem. I hope your patch will solve also the problem, when I read a spss file by

Re: [R] Umlaut read from csv-file

2008-11-07 Thread Prof Brian Ripley
On Fri, 7 Nov 2008, Peter Dalgaard wrote: Heinz Tuechler wrote: Dear Prof.Ripley! Thank you very much for your attention. In the given example Encoding(), or the encoding parameter of read.csv solve the problem. I hope your patch will solve also the problem, when I read a spss file by

Re: [R] Umlaut read from csv-file

2008-11-07 Thread Heinz Tuechler
At 16:52 07.11.2008, Prof Brian Ripley wrote: On Fri, 7 Nov 2008, Peter Dalgaard wrote: Heinz Tuechler wrote: Dear Prof.Ripley! Thank you very much for your attention. In the given example Encoding(), or the encoding parameter of read.csv solve the problem. I hope your patch will solve also

Re: [R] Umlaut read from csv-file

2008-11-07 Thread Prof Brian Ripley
We have no idea what you understood (you didn't tell us), but the help says encoding: character vector. The encoding(s) to be assumed when 'file' is a character string: see 'file'. A possible value is 'unknown': see the ‘Details’. ... This paragraph applies if 'file'

[R] Umlaut read from csv-file

2008-11-06 Thread Heinz Tuechler
Dear All! Reading character strings containing an umlaut from a csv-file I find a (to me) surprising behaviour in R 2.8.0, that I did not notice in R 2.7.2. A comparison by == results in FALSE, while grep does find the aggreement. See the example below. The crucial line is x==div 1-2

Re: [R] Umlaut read from csv-file

2008-11-06 Thread Prof Brian Ripley
Look at Encoding() on your two strings. The results are different, and this seems to be the root of the problem. Adding encoding=latin1 to the read.csv call is a workaround. It looks like there is a problem in the use of the CHARSXP cache: if I save the session then x0 == x becomes true

Re: [R] Umlaut read from csv-file

2008-11-06 Thread Heinz Tuechler
Dear Prof.Ripley! Thank you very much for your attention. In the given example Encoding(), or the encoding parameter of read.csv solve the problem. I hope your patch will solve also the problem, when I read a spss file by spss.get(), since this function has no encoding parameter and my real