Message-ID: <E573D7B7-9DDC-41AA-997A-95223554CABD@comcast.net>
Date: 2011-04-08T11:44:51Z
From: David Winsemius
Subject: Sub/Superscript in plot in a loop
In-Reply-To: <1302227180757-3435021.post@n4.nabble.com>
On Apr 7, 2011, at 9:46 PM, mavkoup wrote:
> I have a for loop with counter i and I'm producing plots where I
> ultimately
> want to label the axes:
>
> "Entry a_i from P^q", where a, P and q are just letters, and i is
> the value
> of the for loop counter.
>
> I've tried various combinations of paste, expression and substitute,
> but I
> can't get this to work nicely.
I'll bet you haven't tried:
as.expression(bquote(Entry~.(a)[.(i)]~from~.(P)^.(q)))
--
David Winsemius, MD
West Hartford, CT