문제

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.

도움이 되었습니까?

해결책

Enclose the comma in a string:

text(0.5,0.2,expression(italic(y[i*","*t])), cex=10)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top