This seems to be a conflict between GTK+ and R. Apparently, GTK+ sets the
locale by itself. There is a way to prevent GTK+ from doing that. I will
release a hotfix for RGtk2 soon and we'll see if it fixes it. I just need to
run gtk_disable_setlocale() before gtk_init_check().

Thanks for reporting this,
Michael

On 1/24/07, NOEL Yvonnick <[EMAIL PROTECTED]> wrote:
>
> Prof Brian Ripley a écrit :
> > I can reproduce this via
> >
> >> Sys.setlocale("LC_NUMERIC", "fr_FR")
> > [1] "fr_FR"
> > Warning message:
> > setting 'LC_NUMERIC' may cause R to function strangely in:
> > setlocale(category, locale)
> >> as.numeric(",1")
> > [1] 0,1
> >> as.numeric(".1")
> > [1] NA
> > Warning message:
> > NAs introduced by coercion
> >
> > Assuming you have not done that anywhere, it should not happen. If you
> > have, you were warned.  (Have you tried starting R with --vanilla to be
> > sure?)
> >
> > as.numeric() is using strtod which should only be affected by the locale
> > category LC_NUMERIC, and R itself does not set LC_NUMERIC.  So either
> > you or some rogue OS function must have, unless there is a pretty major
> > bug in the OS.  (Just using a UTF-8 fr_FR locale does not do it on
> > either of the Linux variants I tried.)
>
> Thanks for these helpful indications. This seems to be related to the
> RGtk2 package :
>
> # Before loading RGtk2
> > as.numeric(".1")
> [1] 0.1
> > as.numeric(",1")
> [1] NA
> Warning message:
> NAs introduits lors de la conversion automatique
> # After library loading
> > library("RGtk2")
> > as.numeric(".1")
> [1] NA
> Warning message:
> NAs introduits lors de la conversion automatique
> > as.numeric(",1")
> [1] 0,1
>
> I send a copy of this post to the RGtk2 package maintainers.
>
> Thanks for your help,
>
> Yvonnick Noel, PhD.
> Dpt of Psychology
> U. of Rennes
> France
>

        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-GUI mailing list
R-SIG-GUI@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-gui

Reply via email to