I was wondering if it were possible to include variables when using expression
in R.
For instance I would like to do something like this:
par(mfrow=c(2,3))
for (i in 1:6)
{
plot(x, p1-i*p2, main=expression(Phi[1] - i * Phi[2]))
}
But this does not work, as it prints Φ1 - iΦ2 (i.e. it does not substitute i
with 1, 2, ... 6