Dear R-helpers I need to produce statistical output where the annotations are in French (and from time to time in German). I produce plots/tables using extensively the latex() , summary.formula() ...functions of Hmisc which allows me for nice print-out. Up to now I "corrected" manually my latex code , replacing such headings as "missing" by "valeur manquante" etc. Is there a (simple) way of updating the R functions with the translated output? (I would of course gladly make it available to the list) I know my question will sound like an heresy to the vast majority of statisticians and I agree it is a waste of statistician time to do translations, but it is due to work related constraints (and I fear the "anti-americanisme primaire" encountered in some european countries) -- Anne
R has since 2.1.0 had all the facilities one needs to mark up output for automated translation. However, we did _choose_ not to do it. One issue is layout: your French label is over twice as long as the English one. Another is that it is hard to translate single words like this out of context. You could produce your own versions of the appropriate print() methods, probably most appropriately via a package. On Mon, 22 Aug 2005, Anne wrote:> Dear R-helpers > > I need to produce statistical output where the annotations are in > French (and from time to time in German). I produce plots/tables using > extensively the latex() , summary.formula() ...functions of Hmisc > which allows me for nice print-out. Up to now I "corrected" manually > my latex code , replacing such headings as "missing" by "valeur > manquante" etc. Is there a (simple) way of updating the R functions > with the translated output? (I would of course gladly make it > available to the list) > > I know my question will sound like an heresy to the vast majority of > statisticians and I agree it is a waste of statistician time to do > translations, but it is due to work related constraints (and I fear > the "anti-americanisme primaire" encountered in some european > countries)-- 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
Anne wrote:> Dear R-helpers > > I need to produce statistical output where the annotations are in > French (and from time to time in German). I produce plots/tables using > extensively the latex() , summary.formula() ...functions of Hmisc > which allows me for nice print-out. Up to now I "corrected" manually > my latex code , replacing such headings as "missing" by "valeur > manquante" etc. Is there a (simple) way of updating the R functions > with the translated output? (I would of course gladly make it > available to the list) > > I know my question will sound like an heresy to the vast majority of > statisticians and I agree it is a waste of statistician time to do > translations, but it is due to work related constraints (and I fear > the "anti-americanisme primaire" encountered in some european > countries) >Anne, If you were to use a general way to detect the language (using the new facilities that Brian Ripley mentioned) and wanted to use that to enhance print. and latex. methods for the summary.formula family of functions, and know or can learn how to use CVS, we will consider giving you access to the Hmisc CVS repository to make the enhancements you want. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University