[R] superscript characters in title with '+'

DrCJones matthias.goddard at gmail.com
Fri Oct 22 15:15:51 CEST 2010


Hi, 
Thanks for all of your replies! 

David, a slightly modified version of what you gave did the trick: 

hist(X,main = expression("["*Ca**""^paste(2,"+")*"]i"~'onsets'))

But I prefer the way '2+' is italicized in the solution Dennis gave: 

hist(X, main = bquote('[Ca'^'2+'*']i'~'onsets'), xlab = 'sec')

I think I understand it now - the '^' symbol must be followed by the '*'
symbol to signify the end of font italicization; and '~' must be used to
signify spaces. The only thing I still don't get is why square brackets
rather than quotation marks surround the 'i' in the solution Claudia gave:  

hist(X, main=expression("[" * Ca^"2+" * "]" [i]~'onsets'),  xlab = 'sec')


-- 
View this message in context: http://r.789695.n4.nabble.com/superscript-characters-in-title-with-tp3006981p3007188.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list