[R] functions and strings

Robin Hankin r.hankin at noc.soton.ac.uk
Wed Sep 13 09:10:00 CEST 2006



string <- "xyz"
f <- function(x){1 + sin(cos(x)) + exp(x^2)}

How do I manipulate "string" and f() to give the string

"1 + sin(cos(xyz)) + exp(xyz^2)"


Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

More information about the R-help mailing list