laurent
2008-Nov-14 19:23 UTC
[Rd] problem with postscript/pdf plots, locales and embedded R
Dear list, A problem with creating pdf or postscript plots from an embedded R, and in an environment where a locale is defined, was recently reported on the rpy (Python->R interface) mailing list. The problem appears to be that whenever the locale defines ',' as a separator for the decimal part of a numerical value, the pdf/ps file generated still has the ',' instead of a '.' causing problem when open the resulting file with a postscript/pdf viewer. Of course, an obvious workaround would be to force the locale for numbers to C ( LC_NUMERIC = "C" ), but that could be overriding internationalization features otherwise in R. Any advice ? Thanks, Laurent
Prof Brian Ripley
2008-Nov-14 19:37 UTC
[Rd] problem with postscript/pdf plots, locales and embedded R
On Fri, 14 Nov 2008, laurent wrote:> Dear list, > > A problem with creating pdf or postscript plots from an embedded R, and > in an environment where a locale is defined, was recently reported on > the rpy (Python->R interface) mailing list. > > The problem appears to be that whenever the locale defines ',' as a > separator for the decimal part of a numerical value, the pdf/ps file > generated still has the ',' instead of a '.' causing problem when open > the resulting file with a postscript/pdf viewer. > > Of course, an obvious workaround would be to force the locale for > numbers to C ( LC_NUMERIC = "C" ), but that could be overriding > internationalization features otherwise in R. > > Any advice ?Don't set LC_NUMERIC with R: ?Sys.setlocale did warn you about that. It used to cause far more problems than this. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Maybe Matching Threads
- Problem with national characters in main, xlab, ylab with pdf{grDevices} / postscript {grDevices}
- No joy installing R with shared libs
- How to use Sys.setlocale("LC_NUMERIC")?
- building rpy against lenny-cran
- [Rpy] "lapack routines cannot be loaded" in Ubuntu Linux 9.10