[R] Symbols to use in text

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Nov 16 21:13:40 CET 2008

On Mon, 17 Nov 2008, Paul Murrell wrote:

> Martin Maechler wrote:
>>>>>>> "GF" == Guillaume Filteau <filteau at email.unc.edu>
>>>>>>>     on Thu, 13 Nov 2008 22:38:04 -0500 writes:
>>     GF> Hello all, I'm trying to use text symbols in R, such are
>>     GF> greek letters and mathematical operators. Do you know
>>     GF> where I can find a list telling me how to use all those
>>     GF> symbols? I'd like to have them displayed in my graphs.
>> help(plotmath) # has "See Also:" for
>>   demo(plotmath) # which has a list
> Also see http://www.stat.auckland.ac.nz/~paul/R/CM/AdobeSym.html
> You should be able to produce any of the symbols in that table.

(as linked from ?plotmath, thanks Paul.  Note 'should': it depends on 
having a complete Symbol font and a few systems do not.)

And possibly others via Unicode: ?plotmath now says on a Unix-alike

      In a UTF-8 locale any Unicode character can be entered, perhaps as
      a '\uxxxx' or '\Uxxxxxxxx' escape sequence, but the issue is
      whether the graphics device is able to display the character.
      The widest range of characters is likely to be available in the
      'X11' device using cairo: see its help page for how installing
      additional fonts can help.

      In non-UTF-8 locales there is normally no support for symbols not
      in the languages for which the current encoding was intended.

and on Windows

      Any Unicode character can be entered into a text string _via_ a
      '\uxxxx' escape, or used by number in a call to 'points'.  The
      'windows' family of devices can display such characters if they
      are available in the font in use.  A good way to both find out
      which characters are available in a font and to determine the
      Unicode number is to use the ‘Character Map’ accessory (usually on
      the ‘Start’ menu under ‘Accessories->System Tools’.  You can also
      copy-and-paste characters from the ‘Character Map’ window to
      'Rgui' (but not to 'Rterm').

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list