[R] How to join two plotmath type expressions

peter dalgaard pdalgd at gmail.com
Fri Aug 17 17:21:12 CEST 2012


On Aug 15, 2012, at 23:17 , Trevor Carey-Smith wrote:

> On 08/15/2012 10:45 PM, S Ellison wrote:
>> label<- 'Temperature'
>> unit<- bquote(degree*C)
>> text(5,5,substitute(l~u, list(l=label, u=unit)))
> 
> Thanks, that's exactly what I was after.

A curious application of bquote though. How about using it where it matters?

plot(5, 4)
label <- 'Temperature'
unit <- quote(degree*C)
text(5, 5, bquote(.(label) ~ .(unit)))

> Regards,
> Trevor.
> --
> Please consider the environment before printing this email.
> NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com




More information about the R-help mailing list