I am using the gdata package to read in an Excel document. read.xls chokes on a 
“foreign” character.  Here's the original code:

   require(gdata)
   dendro <- read.xls("/tmp/avitot.xlsv3WiXg",fileEncoding="Latin1")

Now, the fileEncoding="Latin1" ought to work, because if i copy the code for 
read.xls, and edit

   retval <- read.csv(con, na.strings = na.strings, ...)

appropriately, to include fileEncoding="Latin1" and include the definition to 
override read.xls (to those who wish to test this: you need to include findPerl 
as well), then it works.

but from the code, seems plain that read.xls should pass the 
‘fileEncoding="Latin1"’ all the way to when read.csv is called.

So I don't know if this is a bug, or if I have misuderstood something. 

Is there a better way to achieve this than to edit and override read.xls?  

Any and all suggestions are welcome. 

Thank you,


-- 
Rolf Marvin Bøe Lindgren
r...@grendel.no
http:/www.grendel.no/

______________________________________________
R-help@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.

Reply via email to