There's something (probably a lot) missing in my understanding of plotmath. The LaTeX code for what I'm trying to produce is \log(-\log(\hat R)) My (probably hopeless) attempt at it uses nested group()s: expression(plain(log) * group("(", -plain(log)*group("(", \hat(R), ")"), ")")) Can anyone do it right for me, please? Thanks, Ted. Dr E.A. Catchpole ---------------------------------- | Associate Professor | ------------------------------ | School of Maths & Stats | | Hon Senior Research Fellow | | University of New South Wales at | | Institute of Maths & Stats | | Australian Defence Force Academy | and | University of Kent | | Canberra, ACT 2600, Australia | | Canterbury CT2 7NF, England | | e-catchpole at adfa.edu.au | | E.A.Catchpole at ukc.ac.uk | | www.ma.adfa.edu.au/~eac | ------------------------------ | fax: +61 2 6268 8886 | | ph: +61 2 6268 8895 | ----------------------------------
Is this an example of what you want? xlab <- expression(log(-log(hat(R)))) plot(1, xlab=xlab) Henrik Bengtsson Mathematical Statistics, Lund University, Sweden> -----Original Message----- > From: r-help-admin at stat.math.ethz.ch > [mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of > eac at ma.adfa.edu.au > Sent: den 19 februari 2003 20:26 > To: R Help list > Cc: eac at ma.adfa.edu.au > Subject: [R] plotmath > > > There's something (probably a lot) missing in my > understanding of plotmath. The LaTeX code for what I'm trying > to produce is > > \log(-\log(\hat R)) > > My (probably hopeless) attempt at it uses nested group()s: > > expression(plain(log) * group("(", -plain(log)*group("(", > \hat(R), ")"), > ")")) > > Can anyone do it right for me, please? > > Thanks, > Ted. > > Dr E.A. Catchpole > ---------------------------------- > | Associate Professor | > ------------------------------ > | School of Maths & Stats | | Hon Senior > Research Fellow | > | University of New South Wales at | | Institute of > Maths & Stats | > | Australian Defence Force Academy | and | University of > Kent | > | Canberra, ACT 2600, Australia | | Canterbury CT2 > 7NF, England | > | e-catchpole at adfa.edu.au | | > E.A.Catchpole at ukc.ac.uk | > | www.ma.adfa.edu.au/~eac | > ------------------------------ > | fax: +61 2 6268 8886 | > | ph: +61 2 6268 8895 | > ---------------------------------- > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/> r-help > >
eac at ma.adfa.edu.au wrote:> There's something (probably a lot) missing in my understanding of > plotmath. The LaTeX code for what I'm trying to produce is > > \log(-\log(\hat R)) > > My (probably hopeless) attempt at it uses nested group()s: > > expression(plain(log) * group("(", -plain(log)*group("(", \hat(R), ")"), > ")")) > > Can anyone do it right for me, please?Here's my attempt expression(log(-log(hat(italic(R))))) Unlike TeX, if you want italics you have to ask for it. (If you are attempting anthing serious, the TeX package psfrag is worth a look.) -- Ross Ihaka Email: ihaka at stat.auckland.ac.nz Department of Statistics Phone: (64-9) 373-7599 x 85054 University of Auckland Fax: (64-9) 373-7018 Private Bag 92019, Auckland New Zealand