Message-ID: <483EF00E-5706-4FFF-8EC1-4374C88284DB@web.de>
Date: 2011-06-02T18:43:11Z
From: Marius Hofert
Subject: plotmath: paste string and expression [from a vector of expressions]
Dear all,
I have a vector of expressions and would like to "paste" some string to it before using it in a plot:
vars <- vector("expression", 2)
vars[1] <- expression(alpha)
vars[2] <- expression(beta)
plot(0, 0, main=substitute(bold("Foo" ~~ VAR), list(VAR=vars[2]) ))
Although I tried hard, I just can't figure out how to solve this. The title should be "Foo <theta>", where <theta> is the greek letter. I tried some constructions with bquote but that wasn't successful... I also looked in the mailing list but couldn't find anything helpful [I am sure I overlooked something].
Cheers,
Marius