[R] margin text warning message NAs coercion

Peter Ehlers ehlers at ucalgary.ca
Tue Feb 16 18:25:27 CET 2010


On 2010-02-16 10:18, e-letter wrote:
> On 16/02/2010, Peter Ehlers<ehlers at ucalgary.ca>  wrote:
>> On 2010-02-16 9:21, e-letter wrote:
>>> Readers,
>>>
>>> I tried to the following commands:
>>>
>>> plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D))
>>> mtext(expression(A[1]~B[2]),"additional text",side=3,line=1)
>>
>> Your plot() call is not reproducible.
>>
>> Anyway, try
>>
>> mtext(expression(A[1]~B[2]~~"additional text"),side=3,line=1)
>>
> Thank you. I had seen the command (~~) in the help guide for the
> package plotmath(grdevices), but there is no statement that this
> command can be used to join the expression to literal text.
>

It's a hard space, borrowed from TeX.

?plotmath has this

  x ~~ y      put extra space between x and y

Try also x ~~~~~ y.

  -Peter Ehlers



More information about the R-help mailing list