Skip to content
Prev 9069 / 398502 Next

math expressions

Don Wingate wrote:
What about something like:

   numbers <- 1:2  # the dynamical part
   my.names <- NULL
   for(i in numbers) 
      my.names <- c(my.names, 
         eval(as.expression(substitute(expression(x[i]^2), list(i=i)))))
   dotplot(1:2, labels = my.names)


I don't get it without a loop, but for a plot it shouldn't be too
expensive.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._