Rolf Marvin Bøe Lindgren
2012-Jul-10 13:08 UTC
[R] gdata: Problem reading excel document containing non-US characters
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 at grendel.no http:/www.grendel.no/