Re: [R] Including a tilde in a plotmath-type call

From: Patrick Connolly <p_connolly_at_slingshot.co.nz>
Date: Fri, 30 May 2008 20:15:37 +1200

On Fri, 30-May-2008 at 07:29AM +0100, Prof Brian Ripley wrote:

> I think what you are asking for is not a tilde. That is a raised symbol
> (an accent), and not as in TeX's $\sim$ . It is character 126 in the Adobe
> Symbol encoding (Adobe's name is '\similar'), so one way is
>
> expression(X*symbol("\176")*N(mu, sigma^2))
>
> There are others, and in most circumstances
>
> expression(X * "~" * N(mu, sigma^2))

They say it's easy to be wise after the event. What I should have been searching for was justapose in the help for plotmath.

     The available features are also described in the tables below:

       *Syntax*                        *Meaning*
       'x + y'                         x plus y
       'x - y'                         x minus y
       'x*y'                           juxtapose x and y

I must say that wasn't immediately obvious, but it does cover that second method. Some wisdom isn't easy to acquire. Still can't think of a useful keyword to use so others can find this in the archives.

Thank you Brian and Charilaos.

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}          		 Great minds discuss ideas    
 _( Y )_  	  	        Middle minds discuss events 
(:_~*~_:) 	       		 Small minds discuss people  
 (_)-(_)  	                           ..... Anon
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

______________________________________________
R-help_at_r-project.org 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 Fri 30 May 2008 - 09:09:05 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 Sun 01 Jun 2008 - 23:55:18 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.

list of date sections of archive