Skip to content

I think I just broke R

8 messages · Alexander Engelhardt, Daniel Malter, Uwe Ligges +2 more

#
I swear, I didn't touch it!
I can't fit GLM's anymore, and I can't make it talk english (for 
googling the error messages) anymore.
Fehler in runif(length(pi)) :
   Element 1 ist leer;
   Der Teil der Argumentliste 'length' der berechnet wurde war:
   (pi)
Fehler in runif(length(pi)) :
   Element 1 ist leer;
   Der Teil der Argumentliste 'length' der berechnet wurde war:
   (pi)


I may suffer from sleep deprivation and minor confusion... maybe. But 
this is just weird and I can't explain it.

I run R from Emacs/ESS, if that matters.

Any help would be appreciated!
  -- Alex
#
Am 03.04.2011 03:51, schrieb Daniel Malter:
I wouldn't call my function 'glm'. However, I did call one 'binomial'. 
That was my mistake. Thanks :)

A few weeks ago I asked how to set my error messages to english, and 
Richard Heiberger told me to use 'Sys.setenv(LANG="EN")'.

He used this example, which did work for me at first, but doesn't work 
now anymore:

 > Sys.setenv(LANG="DE")
 > 2+"a"
Fehler in 2 + "a" : nicht-numerisches Argument f?r bin?ren Operator
 > Sys.setenv(LANG="EN")
 > 2+"a"
Fehler in 2 + "a" : nicht-numerisches Argument f?r bin?ren Operator

Does someone have any idea why that could be the case?

My sessionInfo() is here:

 > sessionInfo()
R version 2.10.1 (2009-12-14)
i486-pc-linux-gnu

locale:
  [1] LC_CTYPE=de_DE.utf8       LC_NUMERIC=C
  [3] LC_TIME=de_DE.utf8        LC_COLLATE=de_DE.utf8
  [5] LC_MONETARY=C             LC_MESSAGES=de_DE.utf8
  [7] LC_PAPER=de_DE.utf8       LC_NAME=C
  [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
#
On 03.04.2011 09:30, Alexander Engelhardt wrote:
Use "LANGUAGE" rather than "LANG" as the environment variable.
and time to upgrade R


Best,
Uwe Ligges
#
On Sun, 3 Apr 2011, Uwe Ligges wrote:

            
Also, set it outside your R session, e.g. in your .Renviron file.

You are supposed to be able to change this during an R session, but if 
you rely on OS facilities (as you probably do on Linux) rather than 
the gettext in the R sources, we have seen instances of the OS 
breaking this.

  
    
#
Am 03.04.2011 13:12, schrieb Prof Brian Ripley:
I did use LANGUAGE too, didn't work as well.
Creating a ~/.Rprofile file with LANGUAGE="EN" had no effect (weird..).
When I edited /etc/R/Renviron.site to include LANGUAGE="EN", it worked. 
Thanks for the hints!
I'm still fighting to find out how to upgrade stuff on Ubuntu. After a 
repository update the newest available version was still 2.10.1.
I'll figure it out, sooner or later :)
#
On 11-04-03 7:50 AM, Alexander Engelhardt wrote:
That's not weird:  you just created an R variable named LANGUAGE, not an 
environment variable.

Duncan Murdoch
#
Am 03.04.2011 14:10, schrieb Duncan Murdoch:
Silly me. It works now:

alexx at derp:~$ cat ~/.Renviron
LANGUAGE="EN"

Thanks :)