Re: [R] Hmisc latex function

From: David Whiting <>
Date: Thu 13 Oct 2005 - 01:06:57 EST

Charles Dupont wrote:

> Hmmmm, It works for me. Interesting.
> It almost looks like the temp dir is not being created, but thats not
> possible because R does that. It might be a Unicode issue with you
> system shell. Can you run this statement in R
> sys(paste('cd',dQuote(tempdir()),";",
> "echo Hello BOB > test.test",
> ";","cat test.test"))
> What version of Hmisc are you using? What local are you using?
> Charles

I've had similar problems latex() which I tracked down to dQuote() that I think are related to unicode and locales on Ubuntu 5.04. I think the problem is with Ubuntu (because I get funny little boxes now and then with various applications), but have not managed to get my head around unicode sufficiently well to be able to write a sensible post about this or work out how to fix it. My current way of getting around this in R is to change the locale:

> Sys.getlocale()

> tempdir()

[1] "/tmp/RtmpWL64Z2"
> dQuote(tempdir())

[1] "“/tmp/RtmpWL64Z2”" [I get funny little boxes here]
> Sys.setlocale("LC_CTYPE", "C")
[1] "C"
> Sys.getlocale()

> dQuote(tempdir())

[1] "\"/tmp/RtmpWL64Z2\"" [No funny boxes this time]
> version

platform i686-pc-linux-gnu

arch     i686
os       linux-gnu

system i686, linux-gnu
major 2
minor 1.1
year 2005
month 06
day 20
language R

[Hmmm, I need to update my R installation]

David Whiting
School of Clinical Medical Sciences, The Medical School University of Newcastle upon Tyne, NE2 4HH, UK. mailing list PLEASE do read the posting guide! Received on Thu Oct 13 01:30:34 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:48:09 EST