Domanda

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.

È stato utile?

Soluzione

Enclose the comma in a string:

text(0.5,0.2,expression(italic(y[i*","*t])), cex=10)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top