[R] Latex \ell symbol in plotmath
hadley wickham
h.wickham at gmail.com
Tue Jun 5 19:22:25 CEST 2007
On 6/5/07, Alberto Monteiro <albmont at centroin.com.br> wrote:
> Prof Brian Ripley wrote:
> >
> >> I must be sleeping, but I can't think about a program that lists
> >> "all" Unicode characters. A stupid and dirty solution would be:
> >
> > You realize there are millions of them? (2^21, in theory.)
> >
> :-) Yes, but in Windows there are only 256...
>
> >> cat("u 31 = \u31\n")
> >> cat("u 32 = \u32\n")
> >> ...
> >>
> >> How can I vectorize this?
> >
> > ?intToUtf8
> >
> > E.g. to look at a range around U+2113,
> >
> > cat(intToUtf8(0x2110L+0:9, TRUE), "\n")
> >
> This does not work in R 2.4.1 for Windows. 0x2110L returns
> an error, and intToUtf8 returns an error on anything except
> the simplest calls:
>
> intToUtf8(33) # error. Argument x must be an integer vector
> intToUtf8(33:35) # ok
> intToUtf8(40 + 0:9) # error. Argument x must be an integer vector
Well you need to give it integers!
intToUtf8(33L)
intToUtf8(40L + 0:9)
Hadley
More information about the R-help
mailing list