[R] \ell symbol (log-likelihood)

David Winsemius dwinsemius at comcast.net
Tue Aug 17 18:50:45 CEST 2010


On Aug 17, 2010, at 8:41 AM, ivo welch wrote:

> Dear R experts---is it possible to plot the \ell symbol in R under the
> pdf device?  the following did not work:
>
>  pdf(file="ell.pdf");
>  plot( c(0,1), c(0,1) );
>  text( 0.5, 0.5, "\u2113" )
>  dev.off()
>
> my guess is that this cannot be done, but I thought I would ask.

(On a Mac:)

After 7 warning messages I got an ellipsis ("...") printed at the  
desired location. Interestingly I think the error message might have  
properly printed the desired glyph (assuming you wanted a cursive  
lower case "l":

Warning messages:
1: In text.default(0.5, 0.5, "ℓ") :
   conversion failure on 'ℓ' in 'mbcsToSbcs': dot substituted for <e2>

I also looked in the Hershey fonts without recognition (but could have  
missed one). One the Mac there is an option among the Zapfino family  
but I suspect that is of little use to you.

>

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list