2017-10-13 90 views
0

變量我有一個下標標號N地塊。定義標籤:下標在標籤情節

lab<-c("NO[2]","NO","CO[2]","CO") 
lab2<-noquote(lab) 
plot(1,1,xlab=bquote(.(lab[1]))) 
plot(1,1,xlab=bquote(.(lab2[1]))) 

我想這一點,但與.variable

plot(1,1,xlab=bquote(NO[2])) 

任何想法?

回答

0

你必須parse的字符串。

plot(1, 1, xlab = bquote(.(parse(text = lab[1])))) 

enter image description here