[R] How to plot an expression-label with variable text

Dieter Menne dieter.menne at menne-biomed.de
Fri Aug 27 20:51:27 CEST 2010


Thanks to both of you. I noted that my example was over-simplified. Looks
like I need to correct the environment when nested in a function, but I have
to catch the last bus now.

Dieter


plotExp = function(what) {
  plot.new()
  lab =expression(paste("Estimated ", t[50]," from tgv"))
  text(0.5,0.5,lab)
  # Should look the same as above. Looks like I need a substitute....
  lab =bquote(paste("Estimated ", t[50]," from ",.(what))) ##<<need
environment 
  text(0.5,0.2,lab)
}
plotExp(what)

-- 
View this message in context: http://r.789695.n4.nabble.com/How-to-plot-an-expression-label-with-variable-text-tp2341465p2341499.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list