[R] Latex \ell symbol in plotmath
Alberto Monteiro
albmont at centroin.com.br
Tue Jun 5 19:11:11 CEST 2007
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
Alberto Monteiro
More information about the R-help
mailing list