I think I just broke R

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

I think I just broke R

Alexander Engelhardt
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.


> y <- c(1,1,0,1,0,1)
> x <- c(2,7,3,5,2,4)
> glm(y~x, binomial)
Fehler in runif(length(pi)) :
   Element 1 ist leer;
   Der Teil der Argumentliste 'length' der berechnet wurde war:
   (pi)
> Sys.setenv(LANG="EN")
> glm(y~x, binomial)
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Daniel Malter
Check whether x, y, or glm have been redefined. If not, restart R.

D.

Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Alexander Engelhardt
Am 03.04.2011 03:51, schrieb Daniel Malter:
> Check whether x, y, or glm have been redefined. If not, restart R.

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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Uwe Ligges-3


On 03.04.2011 09:30, Alexander Engelhardt wrote:

> Am 03.04.2011 03:51, schrieb Daniel Malter:
>> Check whether x, y, or glm have been redefined. If not, restart R.
>
> 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?


Use "LANGUAGE" rather than "LANG" as the environment variable.


> My sessionInfo() is here:
>
>  > sessionInfo()
> R version 2.10.1 (2009-12-14)

and time to upgrade R


Best,
Uwe Ligges



> 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
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Prof Brian Ripley
On Sun, 3 Apr 2011, Uwe Ligges wrote:

>
>
> On 03.04.2011 09:30, Alexander Engelhardt wrote:
>> Am 03.04.2011 03:51, schrieb Daniel Malter:
>>> Check whether x, y, or glm have been redefined. If not, restart R.
>>
>> 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?
>
>
> Use "LANGUAGE" rather than "LANG" as the environment variable.
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.

>
>
>> My sessionInfo() is here:
>>
>>  > sessionInfo()
>> R version 2.10.1 (2009-12-14)
>
> and time to upgrade R
>
>
> Best,
> Uwe Ligges
>
>
>
>> 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
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley,                  [hidden email]
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
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Alexander Engelhardt
Am 03.04.2011 13:12, schrieb Prof Brian Ripley:
> On Sun, 3 Apr 2011, Uwe Ligges wrote:
>> Use "LANGUAGE" rather than "LANG" as the environment variable.
>
> 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.

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!

>>> > sessionInfo()
>>> R version 2.10.1 (2009-12-14)
>>
>> and time to upgrade R

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 :)

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Duncan Murdoch-2
On 11-04-03 7:50 AM, Alexander Engelhardt wrote:

> Am 03.04.2011 13:12, schrieb Prof Brian Ripley:
>> On Sun, 3 Apr 2011, Uwe Ligges wrote:
>>> Use "LANGUAGE" rather than "LANG" as the environment variable.
>>
>> 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.
>
> I did use LANGUAGE too, didn't work as well.
> Creating a ~/.Rprofile file with LANGUAGE="EN" had no effect (weird..).

That's not weird:  you just created an R variable named LANGUAGE, not an
environment variable.

Duncan Murdoch

> When I edited /etc/R/Renviron.site to include LANGUAGE="EN", it worked.
> Thanks for the hints!
>
>>>>> sessionInfo()
>>>> R version 2.10.1 (2009-12-14)
>>>
>>> and time to upgrade R
>
> 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 :)
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Alexander Engelhardt
Am 03.04.2011 14:10, schrieb Duncan Murdoch:
> That's not weird: you just created an R variable named LANGUAGE, not an
> environment variable.
>
> Duncan Murdoch

Silly me. It works now:

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

Thanks :)

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: I think I just broke R

Thomas Rusch
In reply to this post by Alexander Engelhardt


> >> and time to upgrade R
>
> 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 :)
>

That's simple. Just add

$deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu maverick/

to /etc/apt/sources.list (or whatever Ubuntu version you use) and type

 $sudo aptitude update
 $sudo aptitude safe-upgrade

See http://cran.r-project.org/bin/linux/ubuntu/

Regards

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.