Skip to content
Prev 307734 / 398503 Next

characters, mathematical expressions and computed values

I think that bquote, with its .() operator, suffices for [almost?] any single title;
don't bother fiddling with expression(), substitute(), or parse().   (You can make
those work in many situations, but if you stick with just bquote then you can
spend your time on the title itself.)

E.g.,
  hist(new, main=bquote("Heart Attack (" * bar(X)==.(mean(new)) * ")"))
or, if you want to limit the number of digits after the decimal point,
  hist(new, main=bquote("Heart Attack (" * bar(X)==.(round(mean(new),1)) * ")"))

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com