Dear Users, What is the proper way to write symbol, superscript, subscript in ggtern/ggplot? I tried every given example, every possible features of ggplot but couldn?t achived. I just want to write P_a, sigma^2, etc, would you please advise me about this problem. Thanks in advance, Levent TERLEMEZ ________________________________ Bu elektronik posta ve onunla iletilen b?t?n dosyalar sadece yukar?da isimleri belirtilen ki?iler aras?nda ?zel haberle?me amac?n? ta??makta olup g?nderici taraf?ndan al?nmas? ama?lanan yetkili ger?ek ya da t?zel ki?inin kullan?m?na aittir. E?er bu elektronik posta size yanl??l?kla ula?m??sa, elektronik postan?n i?eri?ini a??klaman?z, kopyalaman?z, y?nlendirmeniz ve kullanman?z kesinlikle yasakt?r. Bu durumda, l?tfen mesaj? geri g?nderiniz ve sisteminizden siliniz. Anadolu ?niversitesi bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan ve saklanmas?ndan sorumlu de?ildir. Bu mesajdaki g?r??ler yaln?zca g?nderen ki?iye aittir ve Anadolu ?niversitesinin g?r??lerini yans?tmayabilir. This electronic mail and any files transmitted with it are intended for the private use of the people named above. If you are not the intended recipient and received this message in error, forwarding, copying or use of any of the information is strictly prohibited. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. In this case, please immediately notify the sender and delete it from your system. Anadolu University does not guarantee the accuracy or completeness of any information included in this message. Therefore, by any means Anadolu University is not responsible for the content of the message, and the transmission, reception, storage, and use of the information. The opinions expressed in this message only belong to the sender of it and may not reflect the opinions of Anadolu University. [[alternative HTML version deleted]]
> On 4 Dec 2017, at 11:58 , Levent TERLEMEZ via R-help <r-help at r-project.org> wrote: > > Dear Users, > > What is the proper way to write symbol, superscript, subscript in ggtern/ggplot? I tried every given example, every possible features of ggplot but couldn?t achived. I just want to write P_a, sigma^2, etc, would you please advise me about this problem.Did you try expression(P_a)? I don't do much gg-stuff, but I seem to recall that quote() doesn't quite cut it the way it does in base graphics. -pd> > Thanks in advance, > Levent TERLEMEZ > > > > > ________________________________ > > Bu elektronik posta ve onunla iletilen b?t?n dosyalar sadece yukar?da isimleri belirtilen ki?iler aras?nda ?zel haberle?me amac?n? ta??makta olup g?nderici taraf?ndan al?nmas? ama?lanan yetkili ger?ek ya da t?zel ki?inin kullan?m?na aittir. E?er bu elektronik posta size yanl??l?kla ula?m??sa, elektronik postan?n i?eri?ini a??klaman?z, kopyalaman?z, y?nlendirmeniz ve kullanman?z kesinlikle yasakt?r. Bu durumda, l?tfen mesaj? geri g?nderiniz ve sisteminizden siliniz. Anadolu ?niversitesi bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan ve saklanmas?ndan sorumlu de?ildir. Bu mesajdaki g?r??ler yaln?zca g?nderen ki?iye aittir ve Anadolu ?niversitesinin g?r??lerini yans?tmayabilir. > > This electronic mail and any files transmitted with it are intended for the private use of the people named above. If you are not the intended recipient and received this message in error, forwarding, copying or use of any of the information is strictly prohibited. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. In this case, please immediately notify the sender and delete it from your system. Anadolu University does not guarantee the accuracy or completeness of any information included in this message. Therefore, by any means Anadolu University is not responsible for the content of the message, and the transmission, reception, storage, and use of the information. The opinions expressed in this message only belong to the sender of it and may not reflect the opinions of Anadolu University. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>>>>> peter dalgaard <pdalgd at gmail.com> >>>>> on Mon, 4 Dec 2017 14:55:19 +0100 writes:>> On 4 Dec 2017, at 11:58 , Levent TERLEMEZ via R-help >> <r-help at r-project.org> wrote: >> >> Dear Users, >> >> What is the proper way to write symbol, superscript, >> subscript in ggtern/ggplot? I tried every given example, >> every possible features of ggplot but couldn?t achived. I >> just want to write P_a, sigma^2, etc, would you please >> advise me about this problem. > Did you try expression(P_a)? I don't do much gg-stuff, but > I seem to recall that quote() doesn't quite cut it the way > it does in base graphics. > -pd Yes, I vaguely remember that indeed also for the lattice package (which is based on 'grid' the same as 'ggplot2' is ..) sometimes expressions instead of calls are needed, i.e., expression(*) instead of just quote(*). However, I think Levent really meant what you'd get by expression(P[a]) ? @Levent: The clue is the need for valid R syntax, and indeed, as in LaTeX x_i often is the i-th element of x, the R syntax for indexing/subsetting is used here, i.e. x[i] for LaTeX x_i Last but not least, if Levent really needs bquote() [i.e. substitute()] then, a final as.expression(.) may be needed : identical(as.expression(quote(a == 1)), expression( a == 1)) # --> TRUE -- Martin Maechler, ETH Zurich