[R] How to join two plotmath type expressions
Trevor Carey-Smith
trevor.carey-smith at niwa.co.nz
Wed Aug 15 05:56:35 CEST 2012
If I have two variables set, one of which holds an expression, for example:
> label <- 'Temperature'
> unit <- expression(paste(degree,'C'))
how can I join them together for use in mtext (or equivalent)? The
following is conceptually what I want to do, but will obviously not work:
> plot(0:1)
> mtext(paste(label,unit))
Preferably, I would like this to work if one, both or neither of label
and unit are expressions.
Thanks,
Trevor.
--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
More information about the R-help
mailing list