2017-10-13 1 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