Message-ID: <653634A5-52E0-4DCF-855A-9DD5579D482D@gmail.com>
Date: 2012-08-17T15:21:12Z
From: Peter Dalgaard
Subject: How to join two plotmath type expressions
In-Reply-To: <502C11D2.4000108@niwa.co.nz>
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