[R] ylab/ expression/ superscript to a bracket
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Apr 2 00:31:57 CEST 2001
"S.McClatchie" <s.mcclatchie at niwa.cri.nz> writes:
> My problem comes in applying a superscripted number to a bracket (see
> the )^{-3} below:
>
> ylab=expression(paste('mean SV dB [', m^{2},' (160 m',)^{-3},']'))
>
> This gives an error (due to what is interpreted as an extra bracket).
> However, superscript requires a character to superscript to, so I can
> either use a dot (which is confusing in the label)
>
> ylab=expression(paste('mean SV dB [', m^{2},' (160 m)',.^{-3},']'))
>
> or use another kind of bracket. Unfortunately the label needs two kinds
> of brackets. Also using a brace, }^{-3} doesn't help for obvious
> reasons.
>
> Any hints? Help will be appreciated.
?plotmath will tell you about phantom() and group()...
I'd go for
plot(0, ylab=expression('mean SV dB ' *
group("[", m^{2} * ("160 m")^{-3}, "]")))
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list