Re: [R] Latex \ell symbol in plotmath

From: Alberto Monteiro <albmont_at_centroin.com.br>
Date: Tue, 05 Jun 2007 15:11:11 -0200

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



R-help_at_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. Received on Tue 05 Jun 2007 - 17:17:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Jun 2007 - 18:32:02 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.