Question

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)

r subscript

... but when I introduce the comma nothing changes?... and yes, I need the comma.

Was it helpful?

Solution

Enclose the comma in a string:

text(0.5,0.2,expression(italic(y[i*","*t])), cex=10)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top