[R] unicode only works with a second one

Thomas Steiner finbref.2006 at gmail.com
Sat Mar 28 16:18:37 CET 2009


I'd like to paste a zodiac sign on a graph, but it only prints it when
I add another unicode ( \u3030) to the desired \u2648 - why?
See the examplecode (compare the orange with the skyblue):

plot(c(-1,1),c(-4,-2),type="n")
text(x=0,y=-3.0,labels="\u2648 \u3030",cex=2.3,col="skyblue")
text(x=0,y=-3.2,labels="\u2648",cex=2.3,col="orange")
zodiac=c("\u2642 \u2643 \u2644 \u2645 \u2646 \u2647 \u2648 \u2649
\u2650 \u2651 \u2652 \u2653")
text(x=0,y=-3.5,labels=paste(zodiac,"\u3030"),cex=2.3,col="navy")

I use R version 2.8.1 (2008-12-22) under MS Windows Vista.
Thanks for help
Thomas




More information about the R-help mailing list