tags:

views:

63

answers:

2
A: 

Looks like it uses the variables. I set x = 1 and used the following.

> p1 = 100
> p2 = 10
> for (i in 1:6)
+     {
+     plot(x, p1-i*p2, main=expression(Phi[1] - i * Phi[2]))
+     }
> 

It gave me 6 graphs for Φ1 - iΦ2 with each showing the Y value descending.

NinjaCat
Thanks for the answer, but the problem was just the title, not the graph. :)
nico
+5  A: 

Use substitute:

> substitute(Phi[1] - i* Phi[2], list(i = i))
Phi[1] - 3 * Phi[2]
Jonathan Chang
paste() also works, paste("Phi[1] - ", i, "Phi[2]")
Hudson
Thanks! Works perfectly!
nico