I am trying to code using some math type for plotting using expression(paste())
,
if I want alpha
to have the subscript sub1
I can do:
expression(paste(alpha[sub1]))
if i want to prime the subscript I can do:
expression(paste(alpha[sub1^"'"]))
but i can't figure out how to add another subscript after the sub1
, so the subscript reads alpha[sub1'sub2]
i.e. sub1'sub2
is all in one line, at the same level.
I tried
expression(paste(alpha[sub1^"'"sub2]))
and
expression(paste(alpha[sub1^"'"],[sub2]))
It is easy to do without the prime however...
expression(paste(alpha[sub1sub2]))
I think this might be a case for {}
but I can't find any examples that work through this. How can i do this with a prime for sub1
?
First of all there is no need for paste()
here. Secondly, you can use "*" to essentially place values beside each other. Try
expression(alpha[sub1^"'"*sub2])