[R] Symbolic substitution of expressions into expressions
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon May 7 14:16:00 CEST 2001
John Maindonald <john.maindonald at anu.edu.au> writes:
> In the following
>
> titletxt <- substitute(paste(tx, tilde(y) == sqrt(y)),
> list(tx="Replace y by "))
>
> I'd like to be able to replace e.g. sqrt(y) by a symbol or
> symbolic expression that has the effect of inserting sqrt(y)
> into the place that it occupies. This would allow me to put an
> arbitrary expression into that position. [One can use text() or
> mtext() etc. to place titletxt on a graph.]
>
> Any clues would be most welcome.
titletxt <- substitute(paste(tx, tilde(y) == my.y),
list(tx="Replace y by ",my.y=quote(sqrt(y))))
--
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