Reputation: 8366
I am trying to add a label in my R plot for a lag in a hierarchical model $y_{i,t}$. I have the subscript figured out,....
plot.new()
text(0.5,0.8,expression(italic(y[i])), cex=10)
text(0.5,0.2,expression(italic(y[i,t])), cex=10)
... but when I introduce the comma nothing changes?... and yes, I need the comma.
Upvotes: 2
Views: 687
Reputation: 7592
Enclose the comma in a string:
text(0.5,0.2,expression(italic(y[i*","*t])), cex=10)
Upvotes: 3