0

sorry I know this might involve expression and paste but I've spent ages not getting this right I need sigma^2=a variable value as a title in R you can see these efforts don't work

val<-2 
plot(1:10,main=paste(expression("sigma^2"),"=",val))
plot(1:10,main=expression(paste("sigma^2"),"=",val))

many thanks for any advie from wise gurus

user3156942
  • 163
  • 1
  • 8
  • thanks Stephane but I may have tried that before - when I do that it ignores the =2 part I want after - I just get the sigma squared – user3156942 Sep 13 '15 at 11:03
  • Try plot(1:10, main = bquote(sigma^2==.(val))) or plot(1:10, main = substitute(sigma^2==A, list(A = val))) – Michael M Sep 13 '15 at 12:19
  • no probs Stephane, your reply was still helpful, I need to understand betterall this paste, expression,substitute stuff, I'lll read that other post too - thanks again – user3156942 Sep 13 '15 at 15:53

0 Answers0