[R] file reading /problems with encoding

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Mar 1 17:59:15 CET 2010


R is not able to re-encode the file to the native encoding. But if you 
keep it in UTF-8, what is the problem to grep for the specific 
characters (as grep and friends support the argument useBytes these days)?

Best,
Uwe Ligges



On 01.03.2010 17:15, T.Wunder at stud.uni-heidelberg.de wrote:
> Hello Uwe,
>
> Quoting Uwe Ligges <ligges at statistik.tu-dortmund.de>:
>> You can arrange the former without a loop by
>>
>> xml <- paste(t, collapse="")
> Thank you, another trick to improve my R-skills :)
>
>> For the other problem you are reporting: Can you make (the relevbant
>> part of) your file available (say on some web site) so that we can test
>> what is going on?
>
> I've put the file here (I know quite inconvenient, but since I have no
> space respectively no access to space, this is the only chance to
> provide you the file)
>
> http://rapidshare.com/files/357494808/file.xml.html
>
> It's an ordinary xml file created with word 2007 with a table, in which
> the values from a specific data frame should be written.
>
> Another step to solve the problem was to set the global option encoding
> to UTF-8, since it is possible to read and sink this file without any
> special encoding options (of course with no grep-possibilites at special
> characters)
> Setting the encoding-option, however, didn't solve the problem at all. :/
>
>
> Thank you for your help,
> Tom
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list