[R-sig-Debian] R CMD BATCH: set locale?

Mathieu Basille basille at ase-research.org
Thu Oct 25 16:23:54 CEST 2012


Hi Matthieu,

Based on your example, it looks like it's possible to have R CMD BATCH in 
English thanks to .Renviron (at least it works on my computer, which has a 
French Debian install). Here:

$ echo -e "\n### To get R in English:\nLANGUAGE=en" >> ~/.Renviron
$ echo "log(-2)" > file.R
$ R CMD BATCH file.R
$ more +/Warning file.Rout

… escamotage
 > log(-2)
[1] NaN
Warning message:
In log(-2) : NaNs produced
 >
 > proc.time()
    user  system elapsed
   0.160   0.004   0.160

Hope this helps!
Mathieu.


Le 25/10/2012 09:45, Matthieu Stigler a écrit :
> Hi
>
> Thanks for your help! I tried the solution export LC_ALL=C but it does not
> change the behaviour, see:
>
> $ export LC_ALL=C
> $ more file.R
> log(-2)
> $ R CMD BATCH file.R
> $ more +19  file.Rout
>> log(-2)
> [1] NaN
> Message d'avis :
> In log(-2) : production de NaN
>
> Any idea on how to do? Not sure what you meant by changing the linux LOCAL
> environment? Would that be a global change affecting other software/systems?
>
> Maybe my question could be asked on the general help list, although this
> concerns specifically the R setting on Debian/Ubuntu! So hope you will be
> indulgent with this :-)
>
> Thanks!
>
> Matthieu
>
> 2012/10/25 z<z at debian>
>
>> Try to change the Linux LOCAL environment. Perhaps it will work.
>>
>>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 

~$ whoami
Mathieu Basille, PhD

~$ locate --details
University of Florida \\
Fort Lauderdale Research and Education Center
(+1) 954-577-6314
http://ase-research.org/basille

~$ fortune
« Le tout est de tout dire, et je manque de mots
Et je manque de temps, et je manque d'audace. »
  -- Paul Éluard



More information about the R-SIG-Debian mailing list