Re: [R] Question about unicode characters in tcltk

2007-08-18 Thread Gavin Simpson
On Sat, 2007-08-18 at 14:40 +0200, Peter Dalgaard wrote:
> R Help wrote:
> > hello list,
> >
> > Can someone help me figure out why the following code doesn't work?
> > I'm trying to but both Greek letters and subscripts into a tcltk menu.
> >  The code creates all the mu's, and the 1 and 2 subscripts, but it
> > won't create the 0.  Is there a certain set of characters that R won't
> > recognize the unicode for?  Or am I input the \u2080 incorrectly?
> >
> > library(tcltk)
> > m <-tktoplevel()
> > frame1 <- tkframe(m)
> > frame2 <- tkframe(m)
> > frame3 <- tkframe(m)
> > entry1 <- tkentry(frame1,width=5,bg='white')
> > entry2 <- tkentry(frame2,width=5,bg='white')
> > entry3 <- tkentry(frame3,width=5,bg='white')
> >
> > tkpack(tklabel(frame1,text='\u03bc\u2080'),side='left')
> > tkpack(tklabel(frame2,text='\u03bc\u2081'),side='left')
> > tkpack(tklabel(frame3,text='\u03bc\u2082'),side='left')
> >
> > tkpack(frame1,entry1,side='top')
> > tkpack(frame2,entry2,side='top')
> > tkpack(frame3,entry3,side='top')
> >
> > thanks
> > -- Sam
> >
> >   
> Which OS was this? I can reproduce the issue on SuSE, but NOT Fedora 7.

I can reproduce this on Fedora 7 in that the \u2080 is reproduced as is
and not as a subscript, unlike the other \u which appear as
subscripted characters,

> sessionInfo()
R version 2.5.1 Patched (2007-08-02 r42389) 
i686-pc-linux-gnu 

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] "tcltk" "stats" "graphics"  "grDevices" "utils"
"datasets" 
[7] "methods"   "base" 

If there is something specific to my Fedora installation that is
different to Peter's that I can ascertain from installed packages/fonts
etc, then let me know and I can provide the output from my laptop.

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-help@stat.math.ethz.ch 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.


Re: [R] Question about unicode characters in tcltk

2007-08-18 Thread Peter Dalgaard
R Help wrote:
> hello list,
>
> Can someone help me figure out why the following code doesn't work?
> I'm trying to but both Greek letters and subscripts into a tcltk menu.
>  The code creates all the mu's, and the 1 and 2 subscripts, but it
> won't create the 0.  Is there a certain set of characters that R won't
> recognize the unicode for?  Or am I input the \u2080 incorrectly?
>
> library(tcltk)
> m <-tktoplevel()
> frame1 <- tkframe(m)
> frame2 <- tkframe(m)
> frame3 <- tkframe(m)
> entry1 <- tkentry(frame1,width=5,bg='white')
> entry2 <- tkentry(frame2,width=5,bg='white')
> entry3 <- tkentry(frame3,width=5,bg='white')
>
> tkpack(tklabel(frame1,text='\u03bc\u2080'),side='left')
> tkpack(tklabel(frame2,text='\u03bc\u2081'),side='left')
> tkpack(tklabel(frame3,text='\u03bc\u2082'),side='left')
>
> tkpack(frame1,entry1,side='top')
> tkpack(frame2,entry2,side='top')
> tkpack(frame3,entry3,side='top')
>
> thanks
> -- Sam
>
>   
Which OS was this? I can reproduce the issue on SuSE, but NOT Fedora 7.

__
R-help@stat.math.ethz.ch 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.


Re: [R] Question about unicode characters in tcltk

2007-08-14 Thread Peter Dalgaard
R Help wrote:
> hello list,
>
> Can someone help me figure out why the following code doesn't work?
> I'm trying to but both Greek letters and subscripts into a tcltk menu.
>  The code creates all the mu's, and the 1 and 2 subscripts, but it
> won't create the 0.  Is there a certain set of characters that R won't
> recognize the unicode for?  Or am I input the \u2080 incorrectly?
>
> library(tcltk)
> m <-tktoplevel()
> frame1 <- tkframe(m)
> frame2 <- tkframe(m)
> frame3 <- tkframe(m)
> entry1 <- tkentry(frame1,width=5,bg='white')
> entry2 <- tkentry(frame2,width=5,bg='white')
> entry3 <- tkentry(frame3,width=5,bg='white')
>
> tkpack(tklabel(frame1,text='\u03bc\u2080'),side='left')
> tkpack(tklabel(frame2,text='\u03bc\u2081'),side='left')
> tkpack(tklabel(frame3,text='\u03bc\u2082'),side='left')
>
> tkpack(frame1,entry1,side='top')
> tkpack(frame2,entry2,side='top')
> tkpack(frame3,entry3,side='top')
>
>   
Odd, but I think not an R issue. I get weirdness in wish too. Try this

% toplevel .a
.a
% label .a.b -text \u03bc\u2080 -font {Roman -10}
.a.b
% pack .a.b
% .a.b configure
{-activebackground
[]
{-text text Text {} μ₀} {-textvariable textVariable Variable {} {}}
{-underline underline Underline -1 -1} {-width width Width 0 0}
{-wraplength wrapLength WrapLength 0 0}
% .a.b configure -font {Helvetica -12 bold} # the default, now shows \u2080
% .a.b configure -font {Roman -10} # back to Roman, *still* shows \u2080

???!!!

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch 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.


[R] Question about unicode characters in tcltk

2007-08-14 Thread R Help
hello list,

Can someone help me figure out why the following code doesn't work?
I'm trying to but both Greek letters and subscripts into a tcltk menu.
 The code creates all the mu's, and the 1 and 2 subscripts, but it
won't create the 0.  Is there a certain set of characters that R won't
recognize the unicode for?  Or am I input the \u2080 incorrectly?

library(tcltk)
m <-tktoplevel()
frame1 <- tkframe(m)
frame2 <- tkframe(m)
frame3 <- tkframe(m)
entry1 <- tkentry(frame1,width=5,bg='white')
entry2 <- tkentry(frame2,width=5,bg='white')
entry3 <- tkentry(frame3,width=5,bg='white')

tkpack(tklabel(frame1,text='\u03bc\u2080'),side='left')
tkpack(tklabel(frame2,text='\u03bc\u2081'),side='left')
tkpack(tklabel(frame3,text='\u03bc\u2082'),side='left')

tkpack(frame1,entry1,side='top')
tkpack(frame2,entry2,side='top')
tkpack(frame3,entry3,side='top')

thanks
-- Sam

__
R-help@stat.math.ethz.ch 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.